From 21d616bbd2dcd3b162aac824fa34e257675735c8 Mon Sep 17 00:00:00 2001 From: "blakeross%telocity.com" Date: Thu, 14 Sep 2006 05:57:03 +0000 Subject: [PATCH] Use a cached ref to the url bar instead of retrieving it for each page load and accel+L (75331). r=kerz sr=alecf git-svn-id: svn://10.0.0.236/trunk@210727 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/suite/browser/navigator.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mozilla/suite/browser/navigator.js b/mozilla/suite/browser/navigator.js index 7b8cfb148db..5cbe00cb7fb 100644 --- a/mozilla/suite/browser/navigator.js +++ b/mozilla/suite/browser/navigator.js @@ -320,7 +320,7 @@ nsXULBrowserWindow.prototype = // We should probably not do this if the value has changed since the user // searched - document.getElementById("urlbar").value = location; + gURLBar.value = location; UpdateBackForwardButtons(); }, @@ -1399,11 +1399,10 @@ function ShowAndSelectContentsOfURLBar() if (navBar.getAttribute("hidden") == "true") goToggleToolbar('nav-bar','cmd_viewnavbar'); - var urlBar = document.getElementById("urlbar"); - if (urlBar.value) - urlBar.select(); + if (gURLBar.value) + gURLBar.select(); else - urlBar.focus(); + gURLBar.focus(); }