diff --git a/devtools/startup/DevToolsStartup.jsm b/devtools/startup/DevToolsStartup.jsm index 13056f20b69a..12b4e96e7dad 100644 --- a/devtools/startup/DevToolsStartup.jsm +++ b/devtools/startup/DevToolsStartup.jsm @@ -28,6 +28,7 @@ const kDebuggerPrefs = [ ]; const DEVTOOLS_ENABLED_PREF = "devtools.enabled"; +const DEVTOOLS_F12_DISABLED_PREF = "devtools.experiment.f12.shortcut_disabled"; const DEVTOOLS_POLICY_DISABLED_PREF = "devtools.policy.disabled"; @@ -364,6 +365,13 @@ DevToolsStartup.prototype = { // is over). Services.prefs.setBoolPref(DEVTOOLS_ENABLED_PREF, true); + // The F12 shortcut might be disabled to avoid accidental usage. + // Users who are already considered as devtools users should not be + // impacted. + if (this.isDevToolsUser()) { + Services.prefs.setBoolPref(DEVTOOLS_F12_DISABLED_PREF, false); + } + // Store devtoolsFlag to check it later in onWindowReady. this.devtoolsFlag = flags.devtools;