Skip to content

Commit f6cc539

Browse files
Update core/src/components/modal/gestures/sheet.ts
Co-authored-by: Brandy Smith <[email protected]>
1 parent 6416ebe commit f6cc539

File tree

1 file changed

+5
-6
lines changed
  • core/src/components/modal/gestures

1 file changed

+5
-6
lines changed

core/src/components/modal/gestures/sheet.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -417,12 +417,11 @@ export const createSheetGesture = (
417417
}
418418

419419
/**
420-
* If the sheet is going to be fully expanded or if the sheet has toggled
421-
* to scroll at any breakpoint then we should enable scrolling immediately.
422-
* then we should enable scrolling immediately. The sheet modal animation
423-
* takes ~500ms to finish so if we wait until then there is a visible delay
424-
* for when scrolling is re-enabled. Native iOS allows for scrolling on the
425-
* sheet modal as soon as the gesture is released, so we align with that.
420+
* Enables scrolling immediately if the sheet is about to fully expand
421+
* or if it allows scrolling at any breakpoint. Without this, there would
422+
* be a ~500ms delay while the modal animation completes, causing a
423+
* noticeable lag. Native iOS allows scrolling as soon as the gesture is
424+
* released, so we align with that behavior.
426425
*/
427426
if (contentEl && (snapToBreakpoint === breakpoints[breakpoints.length - 1] || !expandToScroll)) {
428427
contentEl.scrollY = true;

0 commit comments

Comments
 (0)