Bug 472802 - Can't change focused bookmark property with Enter in Properties dialogue, r=dietrich
authorMarco Bonardo <mak77@bonardo.net>
Tue, 13 Jan 2009 11:48:26 +0100
changeset 23591 c774155fb74701a1486656b6bfb9b5b8f4c3898a
parent 23590 9cc88fcba152732caf570aa6de7de2d5337b1981
child 23592 23273773e4523b8d3e93f1af68a3b5d92b2cddec
push id4625
push usermak77@bonardo.net
push dateTue, 13 Jan 2009 11:44:36 +0000
treeherdermozilla-central@5b18412c4c4d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdietrich
bugs472802
milestone1.9.2a1pre
Bug 472802 - Can't change focused bookmark property with Enter in Properties dialogue, r=dietrich
browser/components/places/content/bookmarkProperties.js
--- a/browser/components/places/content/bookmarkProperties.js
+++ b/browser/components/places/content/bookmarkProperties.js
@@ -470,16 +470,18 @@ var BookmarkPropertiesPanel = {
         .removeEventListener("input", this._inputListener, false);
     this._element("feedLocationField")
         .removeEventListener("input", this._inputListener, false);
     this._element("siteLocationField")
         .removeEventListener("input", this._inputListener, false);
   },
 
   onDialogAccept: function BPP_onDialogAccept() {
+    // We must blur current focused element to save its changes correctly
+    document.commandDispatcher.focusedElement.blur();
     // The order here is important! We have to uninit the panel first, otherwise
     // late changes could force it to commit more transactions.
     gEditItemOverlay.uninitPanel(true);
     gEditItemOverlay = null;
     this._endBatch();
     window.arguments[0].performed = true;
   },