Skip to content

Commit bffe460

Browse files
committed
fix(modal): fixed expand gesture animation
1 parent c63ec2e commit bffe460

File tree

1 file changed

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

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,14 @@ export const createSheetGesture = (
265265
const onMove = (detail: GestureDetail) => {
266266
/**
267267
* If `expandToScroll` is disabled, we should not allow the swipe gesture
268-
* to continue if the gesture is not pulling down.
268+
* to continue if the gesture is not pulling down within scrollable content.
269269
*/
270270
if (!expandToScroll && detail.deltaY <= 0) {
271-
return;
271+
const contentEl = findClosestIonContent(detail.event.target! as HTMLElement)
272+
const scrollEl = contentEl && isIonContent(contentEl) ? getElementRoot(contentEl).querySelector('.inner-scroll') : contentEl;
273+
if (scrollEl) {
274+
return;
275+
}
272276
}
273277

274278
/**

0 commit comments

Comments
 (0)