Don't react to interactions with disabled buttons

Disabled buttons should not change appearance on mouse hover, click or
on keyboard focus. Doing so destroys the "disabled" impression.
This commit is contained in:
Samuel Mannehed 2022-10-04 14:25:13 +02:00
parent c101a31520
commit 58dfb7df45
1 changed files with 5 additions and 5 deletions

View File

@ -522,19 +522,19 @@ select:active {
.noVNC_button:focus { .noVNC_button:focus {
outline: none; outline: none;
} }
.noVNC_button:active { .noVNC_button:not(:disabled):active {
padding-top: 5px; padding-top: 5px;
padding-bottom: 3px; padding-bottom: 3px;
} }
/* Android browsers don't properly update hover state if touch events /* Android browsers don't properly update hover state if touch events
* are intercepted, but focus should be safe to display */ * are intercepted, but focus should be safe to display */
:root:not(.noVNC_touch) .noVNC_button.noVNC_selected:hover, :root:not(.noVNC_touch) .noVNC_button.noVNC_selected:not(:disabled):hover,
.noVNC_button.noVNC_selected:focus { .noVNC_button.noVNC_selected:not(:disabled):focus {
border-color: rgba(0, 0, 0, 0.4); border-color: rgba(0, 0, 0, 0.4);
background: rgba(0, 0, 0, 0.2); background: rgba(0, 0, 0, 0.2);
} }
:root:not(.noVNC_touch) .noVNC_button:hover, :root:not(.noVNC_touch) .noVNC_button:not(:disabled):hover,
.noVNC_button:focus { .noVNC_button:not(:disabled):focus {
background: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.2);
} }
.noVNC_button.noVNC_hidden { .noVNC_button.noVNC_hidden {