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
681 stars 40 forks source link

[BUG] zStack not reset some times #157

Closed davidecampello closed 3 years ago

davidecampello commented 3 years ago

Describe the bug zStack sometimes product this effect when I open and close the pane multiple times. I'm using Ionic 5 with Angular 12. The problem is that closing the pane, with both close button and background tap does not reset the zStack.

To Reproduce Steps to reproduce the behavior: using this configuration:

const element = document.querySelector('.cupertino-pane') as HTMLElement;
    this.cupertinoPane = new CupertinoPane(element, {
      parentElement: 'body',
      breaks: {
        top: {enabled: true, height: 1000, bounce: false},
        middle: {enabled: true, height: 300, bounce: true},
        bottom: {enabled: false, height: 100, bounce: true}
      },
       zStack: {
         pushElements: ['.ion-page'],
         minPushHeight: 0
       },
      bottomClose: true,
      // clickBottomOpen: false,
      // lowerThanBottom: false,
      // draggableOver: true,
      // dragByCursor: false,
      backdrop: true,
      // topperOverflowOffset: 110
      // followerElement: 'ion-fab',
      // onDrag: () => console.log('Drag event'),
      // onTransitionEnd: (e) => console.log('Transition end', e),
      onBackdropTap: () => this.cupertinoPane.destroy(),
      buttonDestroy: true
      // freeMode: true,
      // onBackdropTap: () => hideDrawer()
    });

Screenshots

Schermata 2021-07-20 alle 16 52 52
roman-rr commented 3 years ago

Hello @davidecampello Z-Stack is disabled on your config. Backdrop doesn't disappear properly ?

davidecampello commented 3 years ago

Hi @roman-rr, I copied after I disabled. Now the code is correct. What happend is sometime the backdrop does not disappear and the page does not come back to the normal dimension.

roman-rr commented 3 years ago

@davidecampello Unfortunately, I couldn't unable to reproduce your issue with configuration you are provided. I using simple ionic starter with cupertino-pane. To find a reason of bug and fix it, i need some example application sources which will be able to reproduce this bug.

Please prepare any repository with sources and give me a link. Be sure that you can reproduce this bug on this sources.

davidecampello commented 3 years ago

I'll prepare an example in the next days.. Thank you!

roman-rr commented 3 years ago

@davidecampello closed due inactivity. But if will be urgent, i will re-open.