File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
core/src/components/modal/gestures Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -340,6 +340,19 @@ export const createSheetGesture = (
340340 return Math . abs ( b - diff ) < Math . abs ( a - diff ) ? b : a ;
341341 } ) ;
342342
343+ /**
344+ * If expandToScroll is disabled, we should not allow the moveSheetToBreakpoint
345+ * function to be called if the user is trying to swipe upwards and the content
346+ * is not scrolled to the top.
347+ */
348+ if ( ! expandToScroll && detail . deltaY <= 0 && findClosestIonContent ( detail . event . target ! as HTMLElement ) ) {
349+ const contentEl = findClosestIonContent ( detail . event . target ! as HTMLElement ) ! ;
350+ const scrollEl = isIonContent ( contentEl ) ? getElementRoot ( contentEl ) . querySelector ( '.inner-scroll' ) : contentEl ;
351+ if ( scrollEl ! . scrollTop > 0 ) {
352+ return ;
353+ }
354+ }
355+
343356 moveSheetToBreakpoint ( {
344357 breakpoint : closest ,
345358 breakpointOffset : offset ,
You can’t perform that action at this time.
0 commit comments