Skip to content

Commit

Permalink
focus on the iframe onload
Browse files Browse the repository at this point in the history
Also removed dispatched space event onload that doesn't do anything
without cursor
  • Loading branch information
abaevbog committed Nov 9, 2023
1 parent fbe170a commit 7d8b56c
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions chrome/content/zotero/integration/quickFormat.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,22 +211,11 @@ var Zotero_QuickFormat = new function () {
_refocusQfe();
})();

window.focus();
qfi.focus();
qfe.focus();

// load citation data
if (io.citation.citationItems.length) {
// hack to get spacing right
let event = new KeyboardEvent(
"keypress",
{
key: " ",
code: "Space",
bubbles: true,
cancelable: true,
}
);
qfe.dispatchEvent(event);
await resizePromise;
var node = qfe.firstChild;
node.nodeValue = "";
Expand Down

0 comments on commit 7d8b56c

Please sign in to comment.