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

Chrome menu clicking issue with scrollYOffset set #650

Closed
vflame opened this issue Sep 19, 2018 · 6 comments
Closed

Chrome menu clicking issue with scrollYOffset set #650

vflame opened this issue Sep 19, 2018 · 6 comments

Comments

@vflame
Copy link

vflame commented Sep 19, 2018

The navigation menu in 2.0 alpha isn't working properly in Chrome (v 69) with the scrollYOffset is set.

Clicking the menu items just collapses them repeatedly. Appears as though it's misclicking. Works fine in firefox.

@RomanHotsiy
Copy link
Member

I can't reproduce it.
Could you please share a minimal reproducible setup?

@RomanHotsiy
Copy link
Member

Closing as "Can't reproduce"

@m-mohr
Copy link
Contributor

m-mohr commented Nov 19, 2018

@RomanGotsiy I have the same or a similar problem. Here is an example: https://open-eo.github.io/openeo-api/v/0.4.0/apireference/ Since some days I can't open the menu on the left properly, it was working for weeks properly. Seems a little like it clicks a little higher than actually clicked and opens wrong menu groups or doesn't open at all.

@RomanHotsiy
Copy link
Member

image

@m-mohr
Copy link
Contributor

m-mohr commented Nov 19, 2018

@RomanGotsiy Sorry, there was a slash missing at the end - didn't know GitHub doesn't like that. See https://open-eo.github.io/openeo-api/v/0.4.0/apireference/ - Try clicking Account Management for example.

@m-mohr
Copy link
Contributor

m-mohr commented Dec 6, 2018

@RomanGotsiy I think I found the issue. The problem occurs if you specify an element for the scrollYOffset which el.getBoundingClientRect().bottom returns a non-integer number for. It seems that in some places it works on integers and in some on floating point numbers and this leads to imprecision when calculation the scrolling position and the active menu item. Using Math.ceil or Math.round in normalizeScrollYOffset solved the problem for me. So I'd suggest only allowing integers as scrollYOffset and ensure in code that it is always an integer.

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

No branches or pull requests

3 participants