-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Selected MenuItem loses background when focused and becomes unreadable #7200
Comments
I guess there's more work to do on top of #7713 😆 |
acmertz
added a commit
to acmertz/video.js
that referenced
this issue
Apr 22, 2021
Use :not() pseudo-class to avoid resetting selected MenuItem style Fixes videojs#7200
acmertz
added a commit
to acmertz/video.js
that referenced
this issue
Apr 22, 2021
Use :not() pseudo-class to avoid resetting selected MenuItem style Fixes videojs#7200
acmertz
added a commit
to acmertz/video.js
that referenced
this issue
Apr 22, 2021
Adds a :not() pseudo class to ensure that the MenuItem background color doesn't get incorrectly reset on mouse focus. Fixes videojs#7200
7 tasks
gkatsev
pushed a commit
that referenced
this issue
May 11, 2021
Adds a :not() pseudo class to ensure that the MenuItem background color doesn't get incorrectly reset on mouse focus. Fixes #7200
edirub
pushed a commit
to edirub/video.js
that referenced
this issue
Jun 8, 2023
Adds a :not() pseudo class to ensure that the MenuItem background color doesn't get incorrectly reset on mouse focus. Fixes videojs#7200
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
When you select a MenuItem, its text and background colors change to clearly indicate which item is selected (as expected). However, if the MenuItem receives mouse focus while in this state, its background color reverts to transparent but the dark text remains, making it very difficult to read.
https://codepen.io/acmertz/pen/gOgQWZV
Steps to reproduce
If the currently selected MenuItem is also the first item in the Menu, then this issue is also easily reproducible by simply clicking the MenuButton so the Menu is locked in its "opened" state. This immediately sets focus to the first (and currently selected) MenuItem and thus reverts the background styles.
Results
Expected
The selected MenuItem always has a white background and dark text.
Actual
If a MenuItem is selected and also has focus, it has dark text on a dark background.
Additional Information
The bug does not occur if you trigger the Menu via your keyboard. The
:focus:not(:focus-visible)
selector used in the Menu styles appears to be conflicting with the MenuItem's "selected" styles. This looks related to #5558 and #7712.Versions
Video.js
v7.11.8
Browsers
Chrome/Edge, Firefox
OS
Windows
Plugins
None
The text was updated successfully, but these errors were encountered: