Topic: Bug in sidenav mobile
vilage free asked 4 years ago
I was having some problems with Sidenav (or Sidenav2) on mobile.. When i triy swipe to close, strange things happened..
I found the "big" problema and it is in this line: this.translateMenuX([this.options.menuWidth + this.options.menuVelocityOffset, rightPos], '200');
this.options.menuVelocityOffset should be this.settings.menuVelocityOffset ..
pass menuVelocityOffset as as options too solve my problem.. but it's not perfet yet.. sometimes when i click in trigger and try swipe, my menu keeps open.. I think it's because "this.menuOut" variable is changed differente when i click to open or swipe to open, also menuRightMinBorder and menuRightMinBorder negative values may have something to do with this behavior..
It's possible in next version change "settings" passing as options? And, it's possible return a instance of Sidenav after initialization? something like: const mySidenav = $('#myTarget').sideNav();
Tomek Makowski staff answered 4 years ago
Hi
Could you show your code in the snippet editor?
Regards
vilage free commented 4 years ago
My code is super simple: $('#sidenav').sideNav({ edge: 'right', closeOnClick: true });
I prefer share a video showing the behavior: https://youtu.be/lgZqmvo7Hcg
The main problem: https://i.imgur.com/gXNFdtT.png https://i.imgur.com/4QZ0NF5.png
menuVelocityOffset is defined as "this.settings.menuVelocityOffset" and called as "this.options.menuVelocityOffset"
Tomek Makowski staff commented 4 years ago
Yeah this is indeed bug in our package. We will fix it soon. Regards
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Free
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.19.0
- Device: Browser
- Browser: Chrome
- OS: Linux Mint
- Provided sample code: No
- Provided link: No