Bug 116441 [clickSelectsAll] should not trigger if click is after end of URL r=jag sr=bz

This commit is contained in:
neil%parkwaycc.co.uk 2006-09-14 06:07:06 +00:00
Родитель bdce4afc3d
Коммит bf526b2d85
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -53,6 +53,7 @@ var gLastValidURLStr = "";
var gLastValidURL = null; var gLastValidURL = null;
var gHaveUpdatedToolbarState = false; var gHaveUpdatedToolbarState = false;
var gClickSelectsAll = false; var gClickSelectsAll = false;
var gClickAtEndSelects = false;
var gIgnoreFocus = false; var gIgnoreFocus = false;
var gIgnoreClick = false; var gIgnoreClick = false;
var gURIFixup = null; var gURIFixup = null;
@ -602,6 +603,7 @@ function Startup()
// does clicking on the urlbar select its contents? // does clicking on the urlbar select its contents?
gClickSelectsAll = pref.getBoolPref("browser.urlbar.clickSelectsAll"); gClickSelectsAll = pref.getBoolPref("browser.urlbar.clickSelectsAll");
gClickAtEndSelects = pref.getBoolPref("browser.urlbar.clickAtEndSelects");
// now load bookmarks after a delay // now load bookmarks after a delay
setTimeout(LoadBookmarksCallback, 0); setTimeout(LoadBookmarksCallback, 0);
@ -1807,8 +1809,9 @@ function URLBarMouseDownHandler(aEvent)
function URLBarClickHandler(aEvent) function URLBarClickHandler(aEvent)
{ {
if (!gIgnoreClick && gClickSelectsAll && gURLBar.selectionStart == gURLBar.selectionEnd && gURLBar.selectionStart < gURLBar.value.length) if (!gIgnoreClick && gClickSelectsAll && gURLBar.selectionStart == gURLBar.selectionEnd)
gURLBar.select(); if (gClickAtEndSelects || gURLBar.selectionStart < gURLBar.value.length)
gURLBar.select();
} }
// This function gets the "windows hooks" service and has it check its setting // This function gets the "windows hooks" service and has it check its setting