Browse Source

[Navigator] Add a pref to allow the stop button to always be enabled

master
Matt A. Tobin 2 years ago committed by Roy Tam
parent
commit
8a86e4daab
  1. 5
      navigator/app/defaults/pref/navigator-prefs.inc.js
  2. 7
      navigator/base/content/nsBrowserStatusHandler.js

5
navigator/app/defaults/pref/navigator-prefs.inc.js

@ -213,6 +213,11 @@ pref("browser.backspace_action", 0);
// 2 - pre-populate site URL and pre-fetch certificate.
pref("browser.ssl_override_behavior", 2);
// Keep the stop button always active
// The stop button WILL remain initally disabled until SOME navigation event
// has occured since it lives in onStateChange.
pref("browser.stopButton.alwaysEnabled", false);
// if true, use full page zoom instead of text zoom
pref("browser.zoom.full", true);

7
navigator/base/content/nsBrowserStatusHandler.js

@ -256,7 +256,12 @@ nsBrowserStatusHandler.prototype =
// XXX: These need to be based on window activity...
// XXXjag: <command id="cmd_stop"/> ?
this.stopButton.disabled = true;
if (Services.prefs.getBoolPref("browser.stopButton.alwaysEnabled", false)) {
this.stopButton.disabled = false;
} else {
this.stopButton.disabled = true;
}
this.stopMenu.setAttribute('disabled', 'true');
this.stopContext.setAttribute('disabled', 'true');
}

Loading…
Cancel
Save