Bug 567613 - Make entire urlbar edit area touchable [r=mfinkle]
authorMatt Brubeck <mbrubeck@mozilla.com>
Mon, 24 May 2010 12:11:23 -0400
changeset 66245 0ebb56d5d83ef27e60784c7f3c64639d6ce30f53
parent 66244 b6ed68f20286a0b2c9726757556be5e80c8a95bb
child 66246 b4bb0b98c03c74437593085b6681d38d379b957c
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs567613
Bug 567613 - Make entire urlbar edit area touchable [r=mfinkle]
mobile/chrome/content/browser-ui.js
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -400,17 +400,17 @@ var BrowserUI = {
 
   init : function() {
     this._edit = document.getElementById("urlbar-edit");
     this._throbber = document.getElementById("urlbar-throbber");
     this._favicon = document.getElementById("urlbar-favicon");
     this._favicon.addEventListener("error", this, false);
 
     let urlbarEditArea = document.getElementById("urlbar-editarea");
-    urlbarEditArea.addEventListener("mouseup", this, false);
+    urlbarEditArea.addEventListener("click", this, false);
     urlbarEditArea.addEventListener("mousedown", this, false);
 
     document.getElementById("toolbar-main").ignoreDrag = true;
 
     let tabs = document.getElementById("tabs");
     tabs.addEventListener("TabSelect", this, true);
     tabs.addEventListener("TabOpen", this, true);
 
@@ -758,20 +758,18 @@ var BrowserUI = {
           case "Search":
             this.doCommand("cmd_openLocation");
             break;
           default:
             break;
         }
         break;
       // URL textbox events
-      case "mouseup":
-        if (aEvent.detail < 2 && aEvent.button == 0 && gFocusManager.focusedElement == this._edit.inputField) {
-          this.doCommand("cmd_openLocation");
-        }
+      case "click":
+        this.doCommand("cmd_openLocation");
         break;
       case "mousedown":
         if (!this._isEventInsidePopup(aEvent))
           this._hidePopup();
 
         let selectAll = gPrefService.getBoolPref("browser.urlbar.doubleClickSelectsAll");
         if (aEvent.detail == 2 && aEvent.button == 0 && selectAll && aEvent.target == this._edit) {
           this._edit.editor.selectAll();