SideNav improvements
There is an issue with the sidenav the way it actually works:
The sideNav function can only get a px value as a width: $(".button-collapse").sideNav({menuWidth: 280}). But the .drag-target element which is used to open and close the sideNav has a width: 50%; added with JS when the drawer is open. A tap on that element closes the sideNav.
That means we have two different cases where this approach will not have the expected behavior:
Case 1: on a small screen
On a small screen, for example 320px, with a sideNav width of 280px, the .drag-target element will have a 160px width. It starts to the right, but that means that it overflows of 120px on the sideNav. So, if the user taps on the right of the sideNav, it will actually tap on the .drag-target and then close the sideNav instead of clicking on what's there in the sideNav.
Case 2: on a big screen
At the opposite, if the screen is big, let's say 800px, then the .drag-target element starts at 400px on the middle of the screen. So, there is 120px between the end of the sideNav and the beginning of the .drag-target, which means that if the user taps here, the sideNav will not be closed.
The solution to this problem is obvious: the width of .drag-target has to be body width minus the sideNav width. It can still overflow a little bit on the side nav to allow the user to close it swipping.
Btw, performance wise, the side nav should be open with a translate3D, not with JavaScript, which causes a lot of repaint.
+1 to this as I just encountered Case 2
Up, is the issue clear? What do you need to work on that?
#1735
Closed due inactivity, please reopen this if you're still having problems
thanks