diff --git a/src/components/menu/menu-gestures.ts b/src/components/menu/menu-gestures.ts index 8ceebb832db..3fc496c961e 100644 --- a/src/components/menu/menu-gestures.ts +++ b/src/components/menu/menu-gestures.ts @@ -22,6 +22,7 @@ export class MenuContentGesture extends SlideEdgeGesture { threshold: 0, maxEdgeStart: menu.maxEdgeStart || 50, zone: false, + passive: true, debouncer: new NativeRafDebouncer(), gesture: gestureCtrl.createGesture({ name: GESTURE_MENU_SWIPE, diff --git a/src/components/menu/menu.ts b/src/components/menu/menu.ts index c60dc41e406..8c9f6087337 100644 --- a/src/components/menu/menu.ts +++ b/src/components/menu/menu.ts @@ -339,7 +339,7 @@ export class Menu { this.setElementAttribute('type', this.type); // add the gestures - this._cntGesture = new MenuContentGesture(this, document.body, this._gestureCtrl); + this._cntGesture = new MenuContentGesture(this, document, this._gestureCtrl); // register listeners if this menu is enabled // check if more than one menu is on the same side @@ -502,9 +502,9 @@ export class Menu { // this places the menu into the correct location before it animates in // this css class doesn't actually kick off any animations - this.menuContent && this.menuContent.resize(); this.setElementClass('show-menu', true); this.backdrop.setElementClass('show-backdrop', true); + this.menuContent && this.menuContent.resize(); this._keyboard.close(); this._isAnimating = true; } diff --git a/src/gestures/drag-gesture.ts b/src/gestures/drag-gesture.ts index b3cda29751f..d76101503e1 100644 --- a/src/gestures/drag-gesture.ts +++ b/src/gestures/drag-gesture.ts @@ -16,6 +16,7 @@ export interface PanGestureConfig { debouncer?: Debouncer; zone?: boolean; capture?: boolean; + passive?: boolean; } /** @@ -40,6 +41,7 @@ export class PanGesture { direction: 'x', zone: true, capture: false, + passive: false, }); this.debouncer = (opts.debouncer) @@ -53,7 +55,8 @@ export class PanGesture { pointerMove: this.pointerMove.bind(this), pointerUp: this.pointerUp.bind(this), zone: opts.zone, - capture: opts.capture + capture: opts.capture, + passive: opts.passive }; this.detector = new PanRecognizer(opts.direction, opts.threshold, opts.maxAngle); }