Disable auto_focus for TinyMCE
TinyMCE triggers a focus on the window itself, which means that the window steals focus when an attachment is created even if another Zotero window is in front. Instead, do a manual focus in the external note window, which is the one place I could find where we rely on it (though there might be others).
This commit is contained in:
parent
3cc92fe1e9
commit
081793f72f
|
@ -709,8 +709,10 @@
|
||||||
self.value = self._value;
|
self.value = self._value;
|
||||||
}
|
}
|
||||||
if (self._focus) {
|
if (self._focus) {
|
||||||
self._iframe.focus();
|
setTimeout(function () {
|
||||||
self._editor.focus();
|
self._iframe.focus();
|
||||||
|
self._editor.focus();
|
||||||
|
});
|
||||||
self._focus = false;
|
self._focus = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,7 @@ async function onLoad() {
|
||||||
noteEditor.refresh();
|
noteEditor.refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
noteEditor.focus();
|
||||||
notifierUnregisterID = Zotero.Notifier.registerObserver(NotifyCallback, 'item', 'noteWindow');
|
notifierUnregisterID = Zotero.Notifier.registerObserver(NotifyCallback, 'item', 'noteWindow');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
body_id: "zotero-tinymce-note",
|
body_id: "zotero-tinymce-note",
|
||||||
content_css: "css/note-content.css",
|
content_css: "css/note-content.css",
|
||||||
|
|
||||||
auto_focus: "tinymce",
|
|
||||||
browser_spellcheck: true,
|
browser_spellcheck: true,
|
||||||
convert_urls: false,
|
convert_urls: false,
|
||||||
entity_encoding: 'raw',
|
entity_encoding: 'raw',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user