Skip to content

Commit

Permalink
Set focus on first button in Copy Clipping Text or Import/Restore Bac…
Browse files Browse the repository at this point in the history
…kup dialogs

(part of issue #450)
- Visually show first focused button on the Copy Clipping Text dialog
  • Loading branch information
aecreations committed Aug 1, 2024
1 parent 89289cf commit dca673f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions wx-src/pages/clippingsMgr.css
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,11 @@ body[data-os="win"] .browser-style > input[type="checkbox"] + label {
background-position: 4px;
}

#copy-clipping-txt-fmt-dlg .copy-fmt-btn:focus {
border-color: var(--color-bkgd) !important;
box-shadow: 0 0 0 2px #45a1ff;
}

#copy-clipping-txt-fmt-dlg #copy-cliptxt-html {
background-image: url("../img/copy-clipping-html16.svg");
}
Expand Down
6 changes: 6 additions & 0 deletions wx-src/pages/clippingsMgr.js
Original file line number Diff line number Diff line change
Expand Up @@ -4521,7 +4521,13 @@ function initDialogs()
$("#import-clippings-file-path").val("");
$("#import-dlg button.dlg-accept").attr("disabled", "true");
gSuppressAutoMinzWnd = true;

// Delay to allow time to switch to import or restore backup UI.
setTimeout(() => {
this.find("#import-clippings-browse")[0].focus();
}, 200);
};

gDialogs.importFromFile.onUnload = function ()
{
$("#import-error").text("").hide();
Expand Down
5 changes: 5 additions & 0 deletions wx-src/pages/sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,11 @@ body[data-os="mac"] .lightbox .msgbox-icon {
margin-right: 0;
}

#copy-clipping-txt-fmt-dlg .copy-fmt-btn:focus {
border-color: var(--color-bkgd) !important;
box-shadow: 0 0 0 2px #45a1ff;
}

#copy-clipping-txt-fmt-dlg #copy-cliptxt-html {
background-image: url("../img/copy-clipping-html32.svg");
}
Expand Down

0 comments on commit dca673f

Please sign in to comment.