tech-systems / panes

🎉📱 Create dynamic modals, cards, panes for your applications in few steps. One instance – Thousands solutions. Any framework and free.
https://panejs.com
MIT License
688 stars 40 forks source link

[BUG] IonMenu is swipable through backdrop #55

Closed BerkeAras closed 4 years ago

BerkeAras commented 4 years ago

Describe the bug IonMenu is swipable through the Cupertino-Pane Backdrop

To Reproduce Just create Ionic App with Menu and open Drawer.

Expected behavior It should not be swipable.

roman-rr commented 4 years ago

@BerkeAras Thank you. I tried, but can't reproduce with both opened menu and drawer. Please share some code.

BerkeAras commented 4 years ago

@roman-rr https://jsfiddle.net/umy4vn91/

roman-rr commented 4 years ago

@BerkeAras

Please try this solution (Disable/Enable gesture) on your scope

<ion-menu [swipeGesture]="swipeGesture">

And controller

public swipeGesture:boolean = true;
constructor() {}

ngOnInit() {
    this.drawer = new CupertinoPane('.ion-drawer', {
      ...
      onWillPresent: () => this.swipeGesture = false,
      onDidDismiss: () => this.swipeGesture = true
    });
    this.drawer.present({animate: true});
}
roman-rr commented 4 years ago

@BerkeAras Already able touchMoveStopPropagation property with the latest commit, and will be able in next release within 1 week.

Simply set

let settings = {
  ...
  touchMoveStopPropagation: true
}

To fix this issue.