From 75a46132fee33c13c867b0b3be467cc2beb9e1e7 Mon Sep 17 00:00:00 2001 From: "reed%reedloden.com" Date: Sun, 24 Feb 2008 07:33:27 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20418673=20-=20"restoring=20the=20current?= =?UTF-8?q?=20location=20when=20clicking=20the=20identity=20button=20is=20?= =?UTF-8?q?jerky,=20because=20handleURLBarRevert=20selects=20the=20address?= =?UTF-8?q?"=20[p=3Ddao@mozilla.com=20(D=C3=83=C2=A3o=20Gottwald)=20r=3DMa?= =?UTF-8?q?no=20a1.9=3Dbeltzner]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://10.0.0.236/trunk@246396 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/browser/base/content/browser.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mozilla/browser/base/content/browser.js b/mozilla/browser/base/content/browser.js index ffdb94b7f0d..e6b7ee3557a 100644 --- a/mozilla/browser/base/content/browser.js +++ b/mozilla/browser/base/content/browser.js @@ -1968,8 +1968,7 @@ function URLBarSetURI(aURI) { SetPageProxyState(state); } -// If "ESC" is pressed in the url bar, we replace the urlbar's value with the url of the page -// and highlight it, unless it is empty. +// Replace the urlbar's value with the url of the page. function handleURLBarRevert() { var throbberElement = document.getElementById("navigator-throbber"); var isScrolling = gURLBar.popupOpen; @@ -1980,7 +1979,9 @@ function handleURLBarRevert() { // and user is NOT key-scrolling through autocomplete list if ((!throbberElement || !throbberElement.hasAttribute("busy")) && !isScrolling) { URLBarSetURI(); - if (gURLBar.value) + + // If the value isn't empty and the urlbar has focus, select the value. + if (gURLBar.value && gURLBar.hasAttribute("focused")) gURLBar.select(); }