Bug 593456 - Only support the two-tap URLBar edit mode in Landscape [r=mfinkle]
authorVivien Nicolas <21@vingtetun.org>
Thu, 09 Sep 2010 11:10:33 +0200
changeset 1902 84b366c27af814abed3bf885729e1cfa9df2ba41
parent 1901 4c574a2e493f713b7ae2842f0af0f6d5ba286655
child 1903 4ac74951887d5b4e424759f9bd44388c6ce6d890
push id1678
push uservnicolas@mozilla.com
push dateThu, 09 Sep 2010 09:47:58 +0000
reviewersmfinkle
bugs593456
Bug 593456 - Only support the two-tap URLBar edit mode in Landscape [r=mfinkle]
chrome/content/browser-ui.js
--- a/chrome/content/browser-ui.js
+++ b/chrome/content/browser-ui.js
@@ -212,24 +212,27 @@ var BrowserUI = {
       }
 
       // Replace the web page title by the url of the page
       let urlString = this.getDisplayURI(Browser.selectedBrowser);
       if (Util.isURLEmpty(urlString))
         urlString = "";
       this._edit.value = urlString;
 
-      if (!this._edit.readOnly) {
+      if (!this._edit.readOnly || Util.isPortrait()) {
+        this._edit.readOnly = false;
+
         // This is a workaround needed to cycle focus for the IME state
         // to be set properly (bug 488420)
         this._edit.blur();
         gFocusManager.setFocus(this._edit, Ci.nsIFocusManager.FLAG_NOSCROLL);
       }
-
-      this._edit.readOnly = !isOpened;
+      else {
+        this._edit.readOnly = !isOpened;
+      }
     }
     else if (!aEdit) {
       this._updateToolbar();
     }
   },
 
   updateAwesomeHeader: function updateAwesomeHeader(aVisible) {
     document.getElementById("awesome-header").hidden = aVisible;