-
Notifications
You must be signed in to change notification settings - Fork 362
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
custom-zoom
autohide: Use CSS :hover
instead of getBoundingClientRect
#7258
base: master
Are you sure you want to change the base?
Conversation
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
I didn't make that addon, and I don't think the person that originally made it is stupid. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Yeah, the reasons seem to be:
And I have addressed them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on Chromium and Firefox with editor-stage-left
and after resizing the window.
We usually try to avoid mousemove events on the document, so this is also related to performance. |
This change makes it impossible to scroll or zoom using the mouse wheel when the mouse is above the zoom buttons. |
Changes
Currently,
custom-zoom
detects if the cursor is hovering over the area withgetBoundingClientRect
andmouseover
event. This PR makes it just use the:hover
selector.Reason for changes
Removes most of the logic for this. It's also a bit more robust when the window is being resized.
Tests
Tested in Edge.