From 2827ee9b73028dcb358ea4725cca63fc0bdc40c9 Mon Sep 17 00:00:00 2001 From: "anthonyd%netscape.com" Date: Thu, 14 Sep 2000 10:46:12 +0000 Subject: [PATCH] fix for bug #22163 making url bar behaviour the same as 4.x and IE xul text fields, autocomplete fields now respond to onblur and onfocus events r=hyatt,mjudge --- xpfe/browser/resources/content/navigator.js | 12 ++++++++++++ xpfe/browser/resources/content/navigator.xul | 2 ++ .../autocomplete/resources/content/autocomplete.xml | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/xpfe/browser/resources/content/navigator.js b/xpfe/browser/resources/content/navigator.js index 0d52f4021d7..11ae3bbe8b8 100644 --- a/xpfe/browser/resources/content/navigator.js +++ b/xpfe/browser/resources/content/navigator.js @@ -1808,3 +1808,15 @@ function getNewThemes() { window._content.location.href = brandBundle.GetStringFromName("getNewThemesURL"); } + +function URLBarFocusHandler(aEvent) +{ + var URLBar = aEvent.target; + URLBar.setSelectionRange(0, URLBar.value.length); +} + +function URLBarBlurHandler(aEvent) +{ + var URLBar = aEvent.target; + URLBar.setSelectionRange(0, 0); +} diff --git a/xpfe/browser/resources/content/navigator.xul b/xpfe/browser/resources/content/navigator.xul index 89434b3865a..9ba845b0b20 100644 --- a/xpfe/browser/resources/content/navigator.xul +++ b/xpfe/browser/resources/content/navigator.xul @@ -289,6 +289,8 @@ Contributor(s): ______________________________________. --> diff --git a/xpfe/components/autocomplete/resources/content/autocomplete.xml b/xpfe/components/autocomplete/resources/content/autocomplete.xml index 9aac584f5c6..ca3d14695c7 100644 --- a/xpfe/components/autocomplete/resources/content/autocomplete.xml +++ b/xpfe/components/autocomplete/resources/content/autocomplete.xml @@ -8,7 +8,7 @@ - +