File tree 1 file changed +11
-8
lines changed
core/src/components/modal/gestures
1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -337,6 +337,17 @@ export const createSheetGesture = (
337
337
onDismiss ( ) ;
338
338
}
339
339
340
+ /**
341
+ * If the sheet is going to be fully expanded then we should enable
342
+ * scrolling immediately. The sheet modal animation takes ~500ms to finish
343
+ * so if we wait until then there is a visible delay for when scrolling is
344
+ * re-enabled. Native iOS allows for scrolling on the sheet modal as soon
345
+ * as the gesture is released, so we align with that.
346
+ */
347
+ if ( contentEl && snapToBreakpoint === breakpoints [ breakpoints . length - 1 ] ) {
348
+ contentEl . scrollY = true ;
349
+ }
350
+
340
351
return new Promise < void > ( ( resolve ) => {
341
352
animation
342
353
. onFinish (
@@ -357,14 +368,6 @@ export const createSheetGesture = (
357
368
currentBreakpoint = snapToBreakpoint ;
358
369
onBreakpointChange ( currentBreakpoint ) ;
359
370
360
- /**
361
- * If the sheet is fully expanded, we can safely
362
- * enable scrolling again.
363
- */
364
- if ( contentEl && currentBreakpoint === breakpoints [ breakpoints . length - 1 ] ) {
365
- contentEl . scrollY = true ;
366
- }
367
-
368
371
/**
369
372
* Backdrop should become enabled
370
373
* after the backdropBreakpoint value
You can’t perform that action at this time.
0 commit comments