-
Notifications
You must be signed in to change notification settings - Fork 59
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
check()
doesn't seem to run properly on page load
#18
Comments
Humm.. have you managed to find out what is causing this? |
I haven't. (I also know very little about front-end development.) My guess was that |
Weird.. I would have hope that at least, jQuery would normalize this kinda behavior across different browsers. the codepen example seems to work in the iOS emulator in dev tools.. have you tried it on your device? This would suggest if the lib is broke or your implementation. |
I have a similar issue, and since both of us use the same jekyll theme, it seems the issue it's influenced by minimal-mistakes theme |
Ok after some stress tests, it seems that in the following function Lines 19 to 23 in 605f64f
w variable could get some smaller value than what is the real width of elements (in my case, 32 pixel less for every element in the menu)
Since the script start at The only reliable fix I could so far is by replacing https://github.com/mmistakes/minimal-mistakes/blob/64a34ee5ae8a37e92b2051828627a957639d911e/assets/js/plugins/jquery.greedy-navigation.js#L7 It's far from being a clean fix, but unfortunately I'm not fluent enough in JS 😥 |
I've been looking in to this a bit with the browser debugger and found that the I've not been able to capture with the debugger the case in your screenshot that the element overflows, but I would believe it could be the same issue (I do get the same behavior as you on mobile browser with overflow as in the screenshot), that the reported with is not the actual. Unfortunately the workaround |
Initially when the page loads, there can be overlapping navigation items (the A in about is cut off):
However, if I scroll down and then back up, an event must get triggered because the navigation items stop overlapping:
I have only been able to reproduce this issue on mobile.
The text was updated successfully, but these errors were encountered: