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

openOnMouseover preventing scrolling out of open mega menu #70

Open
wplit opened this issue Jul 13, 2021 · 2 comments
Open

openOnMouseover preventing scrolling out of open mega menu #70

wplit opened this issue Jul 13, 2021 · 2 comments

Comments

@wplit
Copy link

wplit commented Jul 13, 2021

Unsure if this is on purpose, but doesn't seem like an ideal UX. If the openOnMouseover is set to true, we can hover over the links to display the dropdown, but the downside is that if the dropdowns are quite large and the user tries to scroll down while the mega menu is still open, the browser will keep scrolling them back up to the mega menu with it still being focused.

Eg.. it should be visible in Chrome.

https://codepen.io/wplit/pen/QWvGZXZ

Video showing the issue.

https://www.loom.com/share/243ee7ec48c946eb940f409880b8fb5a

@wplit
Copy link
Author

wplit commented Jul 13, 2021

I had thought it was the browser just focusing and scrolling back to where the focus was, but actually the scrollTop to top is in the code.

Line 304..

if (pageScrollPosition > openPanelTopPosition) { $('html')[0].scrollTop = openPanelTopPosition; }

I'll test it without this code in case I'm missing anything obvious (and it's there for a reason I can't see), but I don't see how scrolling the user constantly back up as they scroll is ideal UX?

@kimisgold
Copy link

Seconded, I'm having the same issue in my usage.

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

2 participants