зеркало из https://github.com/mozilla/gecko-dev.git
Bug 116441 [clickSelectsAll] should not trigger if click is after end of URL r=jag sr=bz
This commit is contained in:
Родитель
65956d2c35
Коммит
11406bb502
|
@ -164,6 +164,8 @@ pref("browser.search.powermode", 0);
|
||||||
pref("browser.search.basic.min_ver", "0.0");
|
pref("browser.search.basic.min_ver", "0.0");
|
||||||
pref("browser.urlbar.autocomplete.enabled", true);
|
pref("browser.urlbar.autocomplete.enabled", true);
|
||||||
pref("browser.urlbar.clickSelectsAll", true);
|
pref("browser.urlbar.clickSelectsAll", true);
|
||||||
|
// when clickSelectsAll=true, does it also apply when the click is past end of text?
|
||||||
|
pref("browser.urlbar.clickAtEndSelects", true);
|
||||||
|
|
||||||
pref("browser.history_expire_days", 9);
|
pref("browser.history_expire_days", 9);
|
||||||
pref("browser.history.grouping", "day");
|
pref("browser.history.grouping", "day");
|
||||||
|
|
|
@ -180,6 +180,8 @@ pref("font.size.fixed.zh-CN", 16);
|
||||||
pref("font.size.variable.zh-TW", 15);
|
pref("font.size.variable.zh-TW", 15);
|
||||||
pref("font.size.fixed.zh-TW", 16);
|
pref("font.size.fixed.zh-TW", 16);
|
||||||
|
|
||||||
|
pref("browser.urlbar.clickAtEndSelects", false);
|
||||||
|
|
||||||
// Tab focus model bit field:
|
// Tab focus model bit field:
|
||||||
// 1 focuses text controls, 2 focuses other form elements, 4 adds links.
|
// 1 focuses text controls, 2 focuses other form elements, 4 adds links.
|
||||||
pref("accessibility.tabfocus", 1);
|
pref("accessibility.tabfocus", 1);
|
||||||
|
|
|
@ -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,7 +1809,8 @@ 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)
|
||||||
|
if (gClickAtEndSelects || gURLBar.selectionStart < gURLBar.value.length)
|
||||||
gURLBar.select();
|
gURLBar.select();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче