b=445715, p=gavin, r=mfinkle. use clickSelectsAll for URL bar
authorMark Finkle <mfinkle@mozilla.com>
Thu, 17 Jul 2008 09:37:34 -0400
changeset 64759 e703ea33576c8a88f0a17634600dadd25abb8d02
parent 64758 efac7cd909ccb9c69e56c5f74ede953d52495c93
child 64760 48daf66edfcff9dbf8103153dbc7816b0b81f2f5
push id19389
push userffxbld
push dateWed, 06 Apr 2011 21:33:21 +0000
treeherdermozilla-central@8e9f90073a20 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs445715
b=445715, p=gavin, r=mfinkle. use clickSelectsAll for URL bar
mobile/chrome/content/browser-ui.js
mobile/chrome/content/browser.xul
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -132,17 +132,16 @@ var BrowserUI = {
 
     return items;
   },
 
   init : function() {
     this._caption = document.getElementById("urlbar-caption");
     this._caption.addEventListener("click", this, false);
     this._edit = document.getElementById("urlbar-edit");
-    this._edit.addEventListener("focus", this, false);
     this._edit.addEventListener("blur", this, false);
     this._edit.addEventListener("keypress", this, true);
     this._edit.addEventListener("input", this, false);
     this._throbber = document.getElementById("urlbar-throbber");
     this._favicon = document.getElementById("urlbar-favicon");
     this._favicon.addEventListener("error", this, false);
     this._autocompleteNavbuttons = document.getElementById("autocomplete_navbuttons");
 
@@ -415,19 +414,16 @@ var BrowserUI = {
         this._showMode(PANELMODE_EDIT);
         break;
       case "input":
         if (this._edit.value) {
           this.updateSearchEngines();
           this._autocompleteNavbuttons.hidden = false;
         }
         break;
-      case "focus":
-        setTimeout(function() { aEvent.target.select(); }, 0);
-        break;
       case "keypress":
         if (aEvent.keyCode == aEvent.DOM_VK_ESCAPE) {
           this._edit.reallyClosePopup();
           this._showMode(PANELMODE_VIEW);
         }
         break;
       // Favicon events
       case "error":
--- a/mobile/chrome/content/browser.xul
+++ b/mobile/chrome/content/browser.xul
@@ -169,20 +169,28 @@
              onclick="getIdentityHandler().handleIdentityButtonEvent(event);"
              onkeypress="getIdentityHandler().handleIdentityButtonEvent(event);">
           <stack id="urlbar-image-stack">
             <image id="urlbar-throbber" src=""/>
             <image id="urlbar-favicon" src=""/>
           </stack>
         </box>
         <description id="urlbar-caption" crop="end" flex="1"/>
-        <textbox id="urlbar-edit" type="autocomplete" autocompletesearch="history" enablehistory="false"
-                 maxrows="6" completeselectedindex="true" minresultsforpopup="0" flex="1" hidden="true"
+        <textbox id="urlbar-edit"
+                 type="autocomplete"
+                 autocompletesearch="history"
+                 enablehistory="false"
+                 maxrows="6"
+                 completeselectedindex="true"
+                 minresultsforpopup="0"
+                 flex="1"
+                 hidden="true"
                  autocompletepopup="popup_autocomplete"
-                 ontextentered="BrowserUI.goToURI();"/>
+                 ontextentered="BrowserUI.goToURI();"
+                 clickSelectsAll="true"/>
       </hbox>
       <hbox id="urlbar-icons">
         <toolbarbutton id="tool-reload" class="urlbar-icon-button" command="cmd_reload"/>
         <toolbarbutton id="tool-stop" class="urlbar-icon-button" command="cmd_stop"/>
         <toolbarbutton id="tool-go" class="urlbar-icon-button" command="cmd_go"/>
       </hbox>
     </toolbar>
   </toolbox>
@@ -201,21 +209,21 @@
         <toolbarbutton id="tool-bookmarks" class="browser-control-button" command="cmd_bookmarks"/>
         <toolbarbutton id="tool-actions" class="browser-control-button" command="cmd_actions"/>
       </vbox>
     </hbox>
 
     <vbox id="urllist-container" flex="1" hidden="true">
       <hbox id="urllist-items-container" flex="1">
         <richlistbox id="urllist-items" flex="1"/>
-     </hbox>
-     <separator class="thin"/>
-     <hbox id="urllist-search">
-       <image class="tool-search"/>
-     </hbox>
+      </hbox>
+      <separator class="thin"/>
+      <hbox id="urllist-search">
+        <image class="tool-search"/>
+      </hbox>
     </vbox>
 
     <vbox id="bookmark-container" flex="1" hidden="true">
       <vbox id="bookmark-form">
         <hbox align="start">
           <image id="bookmark-image" src="chrome://browser/skin/images/starred48.png"/>
           <grid id="bookmark-grid" flex="1">
             <columns>