diff --git a/chrome/content/zotero/lookup.js b/chrome/content/zotero/lookup.js
index 4df73e88e4..31cd984149 100644
--- a/chrome/content/zotero/lookup.js
+++ b/chrome/content/zotero/lookup.js
@@ -146,7 +146,6 @@ var Zotero_Lookup = new function () {
if (event.originalTarget.id != 'zotero-lookup-panel') return;
document.getElementById("zotero-lookup-panel").style.padding = "10px";
- this.getActivePanel().getElementsByTagName('textbox')[0].focus();
// Resize arrow box to fit content
if (Zotero.isMac) {
@@ -157,6 +156,17 @@ var Zotero_Lookup = new function () {
}
+ /**
+ * Focuses the field
+ */
+ this.onShown = function (event) {
+ // Ignore context menu
+ if (event.originalTarget.id != 'zotero-lookup-panel') return;
+
+ this.getActivePanel().querySelector('input').focus();
+ }
+
+
/**
* Cancels the popup and resets fields
*/
@@ -175,11 +185,21 @@ var Zotero_Lookup = new function () {
this.getActivePanel = function() {
var mlPanel = document.getElementById("zotero-lookup-multiline");
- if (mlPanel.collapsed) return document.getElementById("zotero-lookup-singleLine");
+ if (mlPanel.hidden) return document.getElementById("zotero-lookup-singleLine");
return mlPanel;
}
+ this.handleToolbarButtonMouseDown = function (event) {
+ var button = event.target;
+ if (button.disabled) {
+ event.preventDefault();
+ return;
+ }
+ this.showPanel(button)
+ };
+
+
/**
* Handles a key press
*/
diff --git a/chrome/content/zotero/zoteroPane.xhtml b/chrome/content/zotero/zoteroPane.xhtml
index 6740472182..9a91739e06 100644
--- a/chrome/content/zotero/zoteroPane.xhtml
+++ b/chrome/content/zotero/zoteroPane.xhtml
@@ -731,28 +731,31 @@
-
-
- &zotero.lookup.description;
-
+
+
+ &zotero.lookup.description;
+
-
+ oninput="Zotero_Lookup.onInput(event, this)"/>
-
-
-
-
-
+
+
+
+
+
+ &zotero.lookup.button.search;
+
-
-
-
+
+
+
diff --git a/chrome/skin/default/zotero/overlay.css b/chrome/skin/default/zotero/overlay.css
index 314b18c73a..03dd5147d8 100644
--- a/chrome/skin/default/zotero/overlay.css
+++ b/chrome/skin/default/zotero/overlay.css
@@ -301,6 +301,11 @@
list-style-image: url('chrome://zotero/skin/toolbar-item-from-page.png');
}
+#zotero-lookup-multiline-progress
+{
+ height: 2em;
+}
+
/*
#zotero-tb-link-page
{