citation dlg: can accept with open details popup

- allow to accept the dialog via cmd/ctrl+Enter from
inside of a panel
- enable click-through on item details panel, so
one can click on the "Accept" button without having
to close the popup first

These two measures allow one to add a bubble, modify
the citation via item details popup, and accept it
with one less step (without having to close the popup first)
This commit is contained in:
Bogdan Abaev 2026-06-01 09:05:57 -07:00
parent a692ca3493
commit edf951f1d7
2 changed files with 3 additions and 3 deletions

View file

@ -133,7 +133,7 @@
</div>
<div id="popups">
<xul:panel id="itemDetails">
<xul:panel id="itemDetails" consumeoutsideclicks="false">
<div class="vbox popup">
<div class="details-header hbox">
<span class="icon icon-item-type"></span>

View file

@ -49,8 +49,8 @@ export class CitationDialogKeyboardHandler {
// lower-level components
captureKeydown(event) {
let cmdOrCtrl = Zotero.isMac ? event.metaKey : event.ctrlKey;
// Cmd/Ctrl-Enter will always accept the dialog regardless of the target (unless within a panel)
if (event.key == "Enter" && cmdOrCtrl && !event.target.closest("panel")) {
// Cmd/Ctrl-Enter will always accept the dialog regardless of the target
if (event.key == "Enter" && cmdOrCtrl) {
this.doc.dispatchEvent(new CustomEvent("dialog-accepted"));
event.stopPropagation();
event.preventDefault();