Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menu options very sensitive avoid scroll this menu #9

Open
xzegga opened this issue Apr 2, 2014 · 9 comments
Open

Menu options very sensitive avoid scroll this menu #9

xzegga opened this issue Apr 2, 2014 · 9 comments

Comments

@xzegga
Copy link

xzegga commented Apr 2, 2014

I have problem in mobile device when I try to scroll this menu if ammount of menu options not fit on all height of the screen, Apears that the menu is very sensitive, when I try to scroll the options are activated and avoid to scroll the menu to view all options bellow.

Best regads

@FizzyGiant
Copy link

I've been having the same issue, I did you manage to find a fix?

@xzegga
Copy link
Author

xzegga commented Feb 22, 2015

Yes, I resolve this issue, I don't remember at this time how to resolve but I will check my old projects to get solution for you.

@FizzyGiant
Copy link

I ended up getting around the issue by using Hammer.js and rewriting the javascript logic code to use functions provided by hammer.js instead.

I'd still be interested to see how you fixed it without using an external lib though, but don't worry if you can't find it :)

@TonyShark19
Copy link

ev.preventDefault(); is preventing scrolling in the mlpushmenu.js

working on a fix for this....

@TonyShark19
Copy link

change line 136 to always be 'click'
el.querySelector( 'a' ).addEventListener('click', function( ev ) {

this was hanging up the menu on new page load so i added this to line 174
//initialize menu closed
self._resetMenu();

@jtphelan
Copy link

Changing line 136 worked for me, but adding self._resetMenu(); to line 174 gave me a "not a function error" in the console. Seems to work without it though. Not sure if the line numbers are off now, some context would help to know if I placed it in the right place.

@TonyShark19
Copy link

Glad the first part worked for you! I'm new to JS, so that's a win that it worked for both of us.
Here is the resetMenu() command in context. I added this because sometimes on page load the menu would load already opened.
image

@jtphelan
Copy link

That works, thanks. I had it a couple lines below under _openMenu : function( subLevel ) which did not work.

@metew
Copy link

metew commented May 20, 2016

My solution/workaround.

.min file
{L="touchend";g="touchmove"} -> {L="click";g="touchmove"}

or if you want to read the full non min version; this is the offending line for scrolled content.
Replace the 'touchend' with 'click'
.js file (starts line 1109 for me)
if( mobileCheck() ) {
clickEventType = 'touchend';
dragEventType = 'touchmove';
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants