зеркало из https://github.com/mozilla/pjs.git
Bug 190615 - double-clicking shouldn't select punctuation on Unix, p=dao@design-noir.de, r=mano
This commit is contained in:
Родитель
9a9855a2e8
Коммит
bf343a4e68
|
@ -182,15 +182,26 @@ pref("browser.startup.homepage", "resource:/browserconfig.properties"
|
|||
|
||||
pref("browser.cache.disk.capacity", 50000);
|
||||
pref("browser.enable_automatic_image_resizing", true);
|
||||
pref("browser.urlbar.autoFill", false);
|
||||
pref("browser.urlbar.matchOnlyTyped", false);
|
||||
pref("browser.urlbar.hideProtocols", "");
|
||||
pref("browser.urlbar.animateBlend", true);
|
||||
pref("browser.chrome.site_icons", true);
|
||||
pref("browser.chrome.favicons", true);
|
||||
pref("browser.formfill.enable", true);
|
||||
pref("browser.warnOnQuit", true);
|
||||
|
||||
#ifdef XP_UNIX
|
||||
pref("browser.urlbar.clickSelectsAll", false);
|
||||
#else
|
||||
pref("browser.urlbar.clickSelectsAll", true);
|
||||
#endif
|
||||
#ifdef UNIX_BUT_NOT_MAC
|
||||
pref("browser.urlbar.doubleClickSelectsAll", true);
|
||||
#else
|
||||
pref("browser.urlbar.doubleClickSelectsAll", false);
|
||||
#endif
|
||||
pref("browser.urlbar.autoFill", false);
|
||||
pref("browser.urlbar.matchOnlyTyped", false);
|
||||
pref("browser.urlbar.hideProtocols", "");
|
||||
pref("browser.urlbar.animateBlend", true);
|
||||
|
||||
pref("browser.download.useDownloadDir", true);
|
||||
pref("browser.download.folderList", 0);
|
||||
pref("browser.download.manager.showAlertOnComplete", true);
|
||||
|
@ -408,12 +419,6 @@ pref("security.warn_leaving_secure.show_once", true);
|
|||
pref("security.warn_viewing_mixed.show_once", true);
|
||||
pref("security.warn_submit_insecure.show_once", true);
|
||||
|
||||
#ifdef XP_UNIX
|
||||
pref("browser.urlbar.clickSelectsAll", false);
|
||||
#else
|
||||
pref("browser.urlbar.clickSelectsAll", true);
|
||||
#endif
|
||||
|
||||
pref("accessibility.typeaheadfind", false);
|
||||
pref("accessibility.typeaheadfind.timeout", 5000);
|
||||
pref("accessibility.typeaheadfind.linksonly", false);
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
<xul:popupset anonid="popupset" class="autocomplete-result-popupset"/>
|
||||
</content>
|
||||
|
||||
<implementation implements="nsIObserver">
|
||||
<implementation implements="nsIObserver, nsIDOMEventListener">
|
||||
<constructor><![CDATA[
|
||||
this._ioService = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService);
|
||||
|
@ -99,6 +99,7 @@
|
|||
this._hideProtocols = this._prefs.getCharPref("hideProtocols").split(" ");
|
||||
this._animateBlend = this._prefs.getBoolPref("animateBlend");
|
||||
this.clickSelectsAll = this._prefs.getBoolPref("clickSelectsAll");
|
||||
this.doubleClickSelectsAll = this._prefs.getBoolPref("doubleClickSelectsAll");
|
||||
this.completeDefaultIndex = this._prefs.getBoolPref("autoFill");
|
||||
|
||||
this._inputBox = document.getAnonymousElementByAttribute(this, "anonid", "textbox-input-box");
|
||||
|
@ -113,6 +114,7 @@
|
|||
this._urlTooltip = document.getElementById("urlTooltip");
|
||||
|
||||
this.inputField.controllers.insertControllerAt(0, this._copyCutController);
|
||||
this.inputField.addEventListener("mousedown", this, false);
|
||||
|
||||
this._blendingTimers = [];
|
||||
]]></constructor>
|
||||
|
@ -123,6 +125,7 @@
|
|||
this._ioService = null;
|
||||
this._tldService = null;
|
||||
this.inputField.controllers.removeController(this._copyCutController);
|
||||
this.inputField.removeEventListener("mousedown", this, false);
|
||||
]]></destructor>
|
||||
|
||||
<!-- initially empty fields:
|
||||
|
@ -406,7 +409,8 @@
|
|||
this._prettyView(false);
|
||||
break;
|
||||
case "clickSelectsAll":
|
||||
this.clickSelectsAll = this._prefs.getBoolPref(aData);
|
||||
case "doubleClickSelectsAll":
|
||||
this[aData] = this._prefs.getBoolPref(aData);
|
||||
break;
|
||||
case "autoFill":
|
||||
this.completeDefaultIndex = this._prefs.getBoolPref(aData);
|
||||
|
@ -418,6 +422,18 @@
|
|||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="handleEvent">
|
||||
<parameter name="aEvent"/>
|
||||
<body><![CDATA[
|
||||
if (aEvent.type == "mousedown" &&
|
||||
aEvent.button == 0 && aEvent.detail == 2 &&
|
||||
this.doubleClickSelectsAll) {
|
||||
this.inputField.select();
|
||||
aEvent.preventDefault();
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
</implementation>
|
||||
|
||||
<handlers>
|
||||
|
|
|
@ -1987,9 +1987,6 @@ pref("browser.urlbar.clickSelectsAll", false);
|
|||
// Leave this at the default, 7, to match mozilla1.0-era user expectations.
|
||||
// pref("accessibility.tabfocus", 1);
|
||||
|
||||
// override double-click word selection behavior.
|
||||
pref("layout.word_select.stop_at_punctuation", false);
|
||||
|
||||
// autocomplete keyboard grab workaround
|
||||
pref("autocomplete.grab_during_popup", true);
|
||||
pref("autocomplete.ungrab_during_mode_switch", true);
|
||||
|
|
Загрузка…
Ссылка в новой задаче