mirror of
https://github.com/zotero/zotero.git
synced 2026-10-10 03:28:10 +00:00
Citation dialog: allow accepting while details popup is open
- 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:
parent
c72d80f22b
commit
40f949ba94
2 changed files with 3 additions and 3 deletions
|
|
@ -142,7 +142,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>
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue