From ae96563fb3c4612cb8585292b389ee746f5759f7 Mon Sep 17 00:00:00 2001 From: Hans Krywalsky Date: Wed, 2 Jun 2021 14:59:25 +0200 Subject: [PATCH] fix(modal): swipe to close modal is no longer swipeable on footer (#23401) resolves #23398 --- core/src/components/modal/gestures/swipe-to-close.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/components/modal/gestures/swipe-to-close.ts b/core/src/components/modal/gestures/swipe-to-close.ts index e39f05473c..5f4715dc5f 100644 --- a/core/src/components/modal/gestures/swipe-to-close.ts +++ b/core/src/components/modal/gestures/swipe-to-close.ts @@ -24,11 +24,11 @@ export const createSwipeToCloseGesture = ( return true; } - const content = target.closest('ion-content'); - if (content === null) { + const contentOrFooter = target.closest('ion-content, ion-footer'); + if (contentOrFooter === null) { return true; } - // Target is in the content so we don't start the gesture. + // Target is in the content or the footer so do not start the gesture. // We could be more nuanced here and allow it for content that // does not need to scroll. return false;