From 3252c2f8dc46e0853a7f626baa6023a01ac21a25 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Wed, 19 Feb 2020 08:57:42 -0500 Subject: [PATCH] fix(menu): swipe gesture should not open menu when a modal is displayed (#20546) fixes #20467 --- core/src/components/menu/menu.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/components/menu/menu.tsx b/core/src/components/menu/menu.tsx index 71186aac90..00448f372f 100644 --- a/core/src/components/menu/menu.tsx +++ b/core/src/components/menu/menu.tsx @@ -360,7 +360,9 @@ AFTER: } private canStart(detail: GestureDetail): boolean { - if (!this.canSwipe()) { + // Do not allow swipe gesture if a modal is open + const isModalPresented = !!document.querySelector('ion-modal.show-modal'); + if (isModalPresented || !this.canSwipe()) { return false; } if (this._isOpen) {