-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Dont Change Hovering during Control Focus Events #47280
Dont Change Hovering during Control Focus Events #47280
Conversation
…s Exit events. This is incorrect and not fully implemented, and results in inconsistency in the UI and in the hovering variable.
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.
This makes the 3 states: hovered, not hovered, and focus (selection) better by making Hover and Focus as 2 independent mechanisms.
Edited:
Also there's a few other alternatives. https://zellwk.com/blog/style-hover-focus-active-states/
This probably resolves #29326 |
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.
The issue I mentioned is a bit confusing so I wasn't able to confirm whether the PR fixes it xd
But the change looks ok.
I think this resolves that other issue, as well. Nice find. |
Thanks! |
Cherry-picked for 3.4. |
I've talked with a few people on the chat about this. @Calinou and @vnen
This PR removes the alteration of
hovering
during Focus Enter and Focus Exit events. The alteration ofhovering
during Focus Enter and Exit events causes inconsistency in the UI. This PR makes the Hover and Focus styles more clear in their purpose and improves the consistency of the usage of those styles.I've tested and am using this on our projects.
backport to 3.x: #47281
When a Node is focused, it renders with its Hover stylebox and its Focus stylebox. If the node is then then Hovered and UnHovered, the Hover stylebox is removed and replaced with a Normal stylebox. This is inconsistent. It is more logical and intuitive if Hover and Focus are treated as 2 independent mechanisms.
Before:
After:
Bugsquad edit: Fixes #29326.