Improve delete confirmation autofocus visual indication (#956)

This commit is contained in:
narcolepticinsomniac 2020-06-02 02:33:07 -04:00 committed by GitHub
parent a1b0eb7df1
commit 60d314b165
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 0 deletions

View File

@ -454,6 +454,8 @@ Object.assign(handleEvent, {
API.deleteStyle(id);
}
});
const deleteButton = $('#message-box-buttons > button');
if (deleteButton) deleteButton.removeAttribute('data-focused-via-click');
},
external(event) {

View File

@ -134,6 +134,15 @@
text-align: center;
}
.danger #message-box-buttons > button:not([data-focused-via-click]):first-child:focus {
outline: red auto 1px;
}
/* FF ignores color with 'auto' */
.firefox .danger #message-box-buttons > button:not([data-focused-via-click]):first-child:focus {
outline: red solid 1px;
}
.non-windows #message-box-buttons {
text-align: right;
direction: rtl;

View File

@ -341,6 +341,13 @@ a.configure[target="_blank"] .svg-icon.config {
overflow: hidden;
text-overflow: ellipsis;
}
#confirm button[data-cmd="ok"]:not([data-focused-via-click]):focus {
outline: red auto 1px;
}
/* FF ignores color with 'auto' */
.firefox #confirm button[data-cmd="ok"]:not([data-focused-via-click]):focus {
outline: red solid 1px;
}
.menu-items-wrapper {
width: 80%;
max-height: 80%;