diff --git a/chrome/content/zotero/bindings/noteeditor.xml b/chrome/content/zotero/bindings/noteeditor.xml index 51e2e075e8..6b911bd383 100644 --- a/chrome/content/zotero/bindings/noteeditor.xml +++ b/chrome/content/zotero/bindings/noteeditor.xml @@ -322,47 +322,26 @@ { + if (!noteField.hasFocus()) { + document.getElementById(id).focus(); + } }, 0); } return; } - // Insert tab manually - // - // From http://kb.mozillazine.org/Inserting_text_at_cursor - try { - var command = "cmd_insertText"; - var controller = document.commandDispatcher.getControllerForCommand(command); - if (controller && controller.isCommandEnabled(command)) { - controller = controller.QueryInterface(Components.interfaces.nsICommandController); - var params = Components.classes["@mozilla.org/embedcomp/command-params;1"] - .createInstance(Components.interfaces.nsICommandParams); - params.setStringValue("state_data", "\t"); - controller.doCommandWithParams(command, params); - } - } - catch (e) { - Zotero.debug("Can't do cmd_insertText!\n" + e, 1); - } - - // DEBUG: is there a better way to prevent blur()? - setTimeout(function() { event.target.focus(); }, 1); break; } ]]> diff --git a/chrome/content/zotero/bindings/styled-textbox.xml b/chrome/content/zotero/bindings/styled-textbox.xml index db2924863c..e994d5fe55 100644 --- a/chrome/content/zotero/bindings/styled-textbox.xml +++ b/chrome/content/zotero/bindings/styled-textbox.xml @@ -600,6 +600,14 @@ + + + + + +