Bug 1576568 - Enable editor mode everywhere. r=Honza.
authorNicolas Chevobbe <nchevobbe@mozilla.com>
Mon, 21 Oct 2019 08:39:42 +0000
changeset 498317 c8a702f3b356da1219c4318f0abadb63ede25c7e
parent 498316 9705aa1abff2ca780090165b1e6fb7e8b776c325
child 498318 db43f2d8a94310f7d6cf9058e623408e9b011c83
push id36717
push usernbeleuzu@mozilla.com
push dateMon, 21 Oct 2019 21:51:55 +0000
treeherdermozilla-central@563f437f24b9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersHonza
bugs1576568
milestone71.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1576568 - Enable editor mode everywhere. r=Honza. The focus previous element function needed to be modified in order to not find non-visible elements. Differential Revision: https://phabricator.services.mozilla.com/D49729
browser/app/profile/firefox.js
devtools/client/webconsole/components/App.js
devtools/client/webconsole/components/Input/JSTerm.js
devtools/client/webconsole/constants.js
devtools/client/webconsole/reducers/prefs.js
devtools/client/webconsole/store.js
devtools/client/webconsole/test/browser/browser_jsterm_await_concurrent_same_result.js
devtools/client/webconsole/test/browser/browser_jsterm_editor.js
devtools/client/webconsole/test/browser/browser_jsterm_editor_disabled_history_nav_with_keyboard.js
devtools/client/webconsole/test/browser/browser_jsterm_editor_enter.js
devtools/client/webconsole/test/browser/browser_jsterm_editor_execute.js
devtools/client/webconsole/test/browser/browser_jsterm_editor_execute_selection.js
devtools/client/webconsole/test/browser/browser_jsterm_editor_gutter.js
devtools/client/webconsole/test/browser/browser_jsterm_editor_onboarding.js
devtools/client/webconsole/test/browser/browser_jsterm_editor_resize.js
devtools/client/webconsole/test/browser/browser_jsterm_editor_reverse_search_button.js
devtools/client/webconsole/test/browser/browser_jsterm_editor_toggle_keyboard_shortcut.js
devtools/client/webconsole/test/browser/browser_jsterm_editor_toolbar.js
devtools/client/webconsole/test/browser/browser_jsterm_no_input_and_tab_key_pressed.js
devtools/client/webconsole/test/browser/browser_webconsole_telemetry_execute_js.js
devtools/client/webconsole/test/node/mocha-test-setup.js
devtools/client/webconsole/webconsole-wrapper.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -2255,23 +2255,16 @@ pref("devtools.webconsole.timestampMessa
 
 // Enable the webconsole sidebar toggle in Nightly builds.
 #if defined(NIGHTLY_BUILD)
   pref("devtools.webconsole.sidebarToggle", true);
 #else
   pref("devtools.webconsole.sidebarToggle", false);
 #endif
 
-// Enable editor mode in the console in Nightly and DevEdition builds.
-#if defined(NIGHTLY_BUILD) || defined(MOZ_DEV_EDITION)
-  pref("devtools.webconsole.features.editor", true);
-#else
-  pref("devtools.webconsole.features.editor", false);
-#endif
-
 // Saved editor mode state in the console.
 pref("devtools.webconsole.input.editor", false);
 pref("devtools.browserconsole.input.editor", false);
 
 // Editor width for webconsole and browserconsole.
 pref("devtools.webconsole.input.editorWidth", 0);
 pref("devtools.browserconsole.input.editorWidth", 0);
 
--- a/devtools/client/webconsole/components/App.js
+++ b/devtools/client/webconsole/components/App.js
@@ -86,17 +86,16 @@ class App extends Component {
       editorMode: PropTypes.bool,
       editorWidth: PropTypes.number,
       hidePersistLogsCheckbox: PropTypes.bool,
       hideShowContentMessagesCheckbox: PropTypes.bool,
       sidebarVisible: PropTypes.bool.isRequired,
       filterBarDisplayMode: PropTypes.oneOf([
         ...Object.values(FILTERBAR_DISPLAY_MODES),
       ]).isRequired,
-      editorFeatureEnabled: PropTypes.bool.isRequired,
     };
   }
 
   constructor(props) {
     super(props);
 
     this.onClick = this.onClick.bind(this);
     this.onPaste = this.onPaste.bind(this);
@@ -108,30 +107,29 @@ class App extends Component {
     window.addEventListener("blur", this.onBlur);
   }
 
   onBlur() {
     this.props.dispatch(actions.autocompleteClear());
   }
 
   onKeyDown(event) {
-    const { dispatch, webConsoleUI, editorFeatureEnabled } = this.props;
+    const { dispatch, webConsoleUI } = this.props;
 
     if (
       (!isMacOS && event.key === "F9") ||
       (isMacOS && event.key === "r" && event.ctrlKey === true)
     ) {
       const initialValue =
         webConsoleUI.jsterm && webConsoleUI.jsterm.getSelectedText();
       dispatch(actions.reverseSearchInputToggle({ initialValue }));
       event.stopPropagation();
     }
 
     if (
-      editorFeatureEnabled &&
       event.key.toLowerCase() === "b" &&
       ((isMacOS && event.metaKey) || (!isMacOS && event.ctrlKey))
     ) {
       event.stopPropagation();
       event.preventDefault();
       dispatch(actions.editorToggle());
     }
   }
@@ -261,24 +259,23 @@ class App extends Component {
       displayMode: filterBarDisplayMode,
       webConsoleUI,
     });
   }
 
   renderEditorToolbar() {
     const {
       editorMode,
-      editorFeatureEnabled,
       dispatch,
       reverseSearchInputVisible,
       serviceContainer,
       webConsoleUI,
     } = this.props;
 
-    return editorFeatureEnabled && editorMode
+    return editorMode
       ? EditorToolbar({
           key: "editor-toolbar",
           editorMode,
           dispatch,
           reverseSearchInputVisible,
           serviceContainer,
           webConsoleUI,
         })
@@ -297,28 +294,26 @@ class App extends Component {
 
   renderJsTerm() {
     const {
       webConsoleUI,
       serviceContainer,
       autocomplete,
       editorMode,
       editorWidth,
-      editorFeatureEnabled,
     } = this.props;
 
     return JSTerm({
       key: "jsterm",
       webConsoleUI,
       serviceContainer,
       onPaste: this.onPaste,
       autocomplete,
-      editorMode: editorMode && editorFeatureEnabled,
+      editorMode,
       editorWidth,
-      editorFeatureEnabled,
     });
   }
 
   renderReverseSearch() {
     const { serviceContainer, reverseSearchInitialValue } = this.props;
 
     return ReverseSearchInput({
       key: "reverse-search-input",
@@ -333,43 +328,43 @@ class App extends Component {
     return SideBar({
       key: "sidebar",
       serviceContainer,
       visible: sidebarVisible,
     });
   }
 
   renderNotificationBox() {
-    const { notifications, editorMode, editorFeatureEnabled } = this.props;
+    const { notifications, editorMode } = this.props;
 
     return NotificationBox({
       id: "webconsole-notificationbox",
       key: "notification-box",
-      displayBorderTop: !(editorMode && editorFeatureEnabled),
-      displayBorderBottom: editorMode && editorFeatureEnabled,
+      displayBorderTop: !editorMode,
+      displayBorderBottom: editorMode,
       wrapping: true,
       notifications,
     });
   }
 
   renderConfirmDialog() {
     const { webConsoleUI, serviceContainer } = this.props;
 
     return ConfirmDialog({
       webConsoleUI,
       serviceContainer,
       key: "confirm-dialog",
     });
   }
 
   renderRootElement(children) {
-    const { editorMode, editorFeatureEnabled, serviceContainer } = this.props;
+    const { editorMode, serviceContainer } = this.props;
 
     const classNames = ["webconsole-app"];
-    if (editorMode && editorFeatureEnabled) {
+    if (editorMode) {
       classNames.push("jsterm-editor");
     }
     if (serviceContainer.canRewind()) {
       classNames.push("can-rewind");
     }
 
     return div(
       {
@@ -380,22 +375,17 @@ class App extends Component {
           this.node = node;
         },
       },
       children
     );
   }
 
   render() {
-    const {
-      webConsoleUI,
-      editorMode,
-      editorFeatureEnabled,
-      dispatch,
-    } = this.props;
+    const { webConsoleUI, editorMode, dispatch } = this.props;
 
     const filterBar = this.renderFilterBar();
     const editorToolbar = this.renderEditorToolbar();
     const consoleOutput = this.renderConsoleOutput();
     const notificationBox = this.renderNotificationBox();
     const jsterm = this.renderJsTerm();
     const reverseSearch = this.renderReverseSearch();
     const sidebar = this.renderSideBar();
@@ -407,17 +397,17 @@ class App extends Component {
       dom.div(
         { className: "flexible-output-input", key: "in-out-container" },
         consoleOutput,
         notificationBox,
         jsterm
       ),
       GridElementWidthResizer({
         key: "editor-resizer",
-        enabled: editorFeatureEnabled && editorMode,
+        enabled: editorMode,
         position: "end",
         className: "editor-resizer",
         getControlledElementNode: () => webConsoleUI.jsterm.node,
         onResizeEnd: width => dispatch(actions.setEditorWidth(width)),
       }),
       reverseSearch,
       sidebar,
       confirmDialog,
--- a/devtools/client/webconsole/components/Input/JSTerm.js
+++ b/devtools/client/webconsole/components/Input/JSTerm.js
@@ -28,17 +28,17 @@ loader.lazyRequireGetter(
 );
 loader.lazyRequireGetter(
   this,
   "Editor",
   "devtools/client/shared/sourceeditor/editor"
 );
 loader.lazyRequireGetter(
   this,
-  "focusableSelector",
+  "getFocusableElements",
   "devtools/client/shared/focus",
   true
 );
 loader.lazyRequireGetter(
   this,
   "l10n",
   "devtools/client/webconsole/utils/messages",
   true
@@ -94,18 +94,16 @@ class JSTerm extends Component {
       autocompleteUpdate: PropTypes.func.isRequired,
       autocompleteClear: PropTypes.func.isRequired,
       // Data to be displayed in the autocomplete popup.
       autocompleteData: PropTypes.object.isRequired,
       // Toggle the editor mode.
       editorToggle: PropTypes.func.isRequired,
       // Dismiss the editor onboarding UI.
       editorOnboardingDismiss: PropTypes.func.isRequired,
-      // Is the editor feature enabled
-      editorFeatureEnabled: PropTypes.bool,
       // Is the input in editor mode.
       editorMode: PropTypes.bool,
       editorWidth: PropTypes.number,
       showEditorOnboarding: PropTypes.bool,
       autocomplete: PropTypes.bool,
     };
   }
 
@@ -537,17 +535,22 @@ class JSTerm extends Component {
   focusPreviousElement() {
     const inputField = this.editor.codeMirror.getInputField();
 
     const findPreviousFocusableElement = el => {
       if (!el || !el.querySelectorAll) {
         return null;
       }
 
-      const items = Array.from(el.querySelectorAll(focusableSelector));
+      // We only want to get visible focusable element, and for that we can assert that
+      // the offsetParent isn't null. We can do that because we don't have fixed position
+      // element in the console.
+      const items = getFocusableElements(el).filter(
+        ({ offsetParent }) => offsetParent !== null
+      );
       const inputIndex = items.indexOf(inputField);
 
       if (items.length === 0 || (inputIndex > -1 && items.length === 1)) {
         return findPreviousFocusableElement(el.parentNode);
       }
 
       const index = inputIndex > 0 ? inputIndex - 1 : items.length - 1;
       return items[index];
@@ -1044,31 +1047,31 @@ class JSTerm extends Component {
       this.editor.destroy();
       this.editor = null;
     }
 
     this.webConsoleUI = null;
   }
 
   renderOpenEditorButton() {
-    if (!this.props.editorFeatureEnabled || this.props.editorMode) {
+    if (this.props.editorMode) {
       return null;
     }
 
     return dom.button({
       className: "devtools-button webconsole-input-openEditorButton",
       title: l10n.getFormatStr("webconsole.input.openEditorButton.tooltip2", [
         isMacOS ? "Cmd + B" : "Ctrl + B",
       ]),
       onClick: this.props.editorToggle,
     });
   }
 
   renderEditorOnboarding() {
-    if (!this.props.editorFeatureEnabled || !this.props.showEditorOnboarding) {
+    if (!this.props.showEditorOnboarding) {
       return null;
     }
 
     // We deliberately use getStr, and not getFormatStr, because we want keyboard
     // shortcuts to be wrapped in their own span.
     const label = l10n.getStr("webconsole.input.editor.onboarding.label");
     let [prefix, suffix] = label.split("%1$S");
     suffix = suffix.split("%2$S");
--- a/devtools/client/webconsole/constants.js
+++ b/devtools/client/webconsole/constants.js
@@ -80,17 +80,16 @@ const prefs = {
       // Show the Editor onboarding UI
       EDITOR_ONBOARDING: "devtools.webconsole.input.editorOnboarding",
     },
     FEATURES: {
       // We use the same pref to enable the sidebar on webconsole and browser console.
       SIDEBAR_TOGGLE: "devtools.webconsole.sidebarToggle",
       AUTOCOMPLETE: "devtools.webconsole.input.autocomplete",
       GROUP_WARNINGS: "devtools.webconsole.groupWarningMessages",
-      EDITOR: "devtools.webconsole.features.editor",
       BROWSER_TOOLBOX_FISSION: "devtools.browsertoolbox.fission",
     },
   },
 };
 
 const FILTERS = {
   CSS: "css",
   DEBUG: "debug",
--- a/devtools/client/webconsole/reducers/prefs.js
+++ b/devtools/client/webconsole/reducers/prefs.js
@@ -10,17 +10,16 @@ const {
 const PrefState = overrides =>
   Object.freeze(
     Object.assign(
       {
         logLimit: 1000,
         sidebarToggle: false,
         groupWarnings: false,
         historyCount: 50,
-        editor: false,
       },
       overrides
     )
   );
 
 function prefs(state = PrefState(), action) {
   if (action.type === WARNING_GROUPS_TOGGLE) {
     return {
--- a/devtools/client/webconsole/store.js
+++ b/devtools/client/webconsole/store.js
@@ -44,27 +44,25 @@ function configureStore(webConsoleUI, op
   const prefsService = getPrefsService(webConsoleUI);
   const { getBoolPref, getIntPref } = prefsService;
 
   const logLimit =
     options.logLimit || Math.max(getIntPref("devtools.hud.loglimit"), 1);
   const sidebarToggle = getBoolPref(PREFS.FEATURES.SIDEBAR_TOGGLE);
   const autocomplete = getBoolPref(PREFS.FEATURES.AUTOCOMPLETE);
   const groupWarnings = getBoolPref(PREFS.FEATURES.GROUP_WARNINGS);
-  const editor = getBoolPref(PREFS.FEATURES.EDITOR);
   const historyCount = getIntPref(PREFS.UI.INPUT_HISTORY_COUNT);
 
   const initialState = {
     prefs: PrefState({
       logLimit,
       sidebarToggle,
       autocomplete,
       historyCount,
       groupWarnings,
-      editor,
     }),
     filters: FilterState({
       error: getBoolPref(PREFS.FILTER.ERROR),
       warn: getBoolPref(PREFS.FILTER.WARN),
       info: getBoolPref(PREFS.FILTER.INFO),
       debug: getBoolPref(PREFS.FILTER.DEBUG),
       log: getBoolPref(PREFS.FILTER.LOG),
       css: getBoolPref(PREFS.FILTER.CSS),
--- a/devtools/client/webconsole/test/browser/browser_jsterm_await_concurrent_same_result.js
+++ b/devtools/client/webconsole/test/browser/browser_jsterm_await_concurrent_same_result.js
@@ -6,17 +6,16 @@
 
 "use strict";
 
 const TEST_URI =
   "data:text/html;charset=utf-8,Test concurrent top-level await expressions returning same value";
 
 add_task(async function() {
   // Enable editor mode as we'll be able to quicly trigger multiple evaluations.
-  await pushPref("devtools.webconsole.features.editor", true);
   await pushPref("devtools.webconsole.input.editor", true);
 
   const hud = await openNewTabAndConsole(TEST_URI);
   setInputValue(
     hud,
     `await new Promise(res => setTimeout(() => res("foo"), 5000))`
   );
 
@@ -31,11 +30,10 @@ add_task(async function() {
 
   await waitFor(
     () => findMessages(hud, "foo", ".result").length === 3,
     "Waiting for all results to be printed in console",
     1000
   );
   ok(true, "There are as many results as commands");
 
-  Services.prefs.clearUserPref("devtools.webconsole.features.editor");
   Services.prefs.clearUserPref("devtools.webconsole.input.editor");
 });
--- a/devtools/client/webconsole/test/browser/browser_jsterm_editor.js
+++ b/devtools/client/webconsole/test/browser/browser_jsterm_editor.js
@@ -3,17 +3,16 @@
 
 // Check that the editor is displayed as expected.
 
 "use strict";
 
 const TEST_URI = "data:text/html;charset=utf8,<p>Test editor";
 
 add_task(async function() {
-  await pushPref("devtools.webconsole.features.editor", true);
   await pushPref("devtools.webconsole.input.editor", false);
 
   const tab = await addTab(TEST_URI);
   let hud = await openConsole(tab);
 
   info("Test that the editor mode is disabled when the pref is set to false");
   is(
     isEditorModeEnabled(hud),
--- a/devtools/client/webconsole/test/browser/browser_jsterm_editor_disabled_history_nav_with_keyboard.js
+++ b/devtools/client/webconsole/test/browser/browser_jsterm_editor_disabled_history_nav_with_keyboard.js
@@ -6,17 +6,16 @@
 // See https://bugzilla.mozilla.org/show_bug.cgi?id=1519313
 
 "use strict";
 
 const TEST_URI =
   "data:text/html;charset=utf-8,Web Console test for bug 1519313";
 
 add_task(async function() {
-  await pushPref("devtools.webconsole.features.editor", true);
   await pushPref("devtools.webconsole.input.editor", true);
   const hud = await openNewTabAndConsole(TEST_URI);
 
   const testExpressions = [
     "`Mozilla 😍 Firefox`",
     "`Firefox Devtools are awesome`",
     "`2 + 2 = 5?`",
     "`I'm running out of ideas...`",
--- a/devtools/client/webconsole/test/browser/browser_jsterm_editor_enter.js
+++ b/devtools/client/webconsole/test/browser/browser_jsterm_editor_enter.js
@@ -6,17 +6,16 @@
 // See https://bugzilla.mozilla.org/show_bug.cgi?id=1519314
 
 "use strict";
 
 const TEST_URI =
   "data:text/html;charset=utf-8,Web Console test for bug 1519314";
 
 add_task(async function() {
-  await pushPref("devtools.webconsole.features.editor", true);
   await pushPref("devtools.webconsole.input.editor", true);
   await performEditorEnabledTests();
 });
 
 add_task(async function() {
   await pushPref("devtools.webconsole.input.editor", false);
   await performEditorDisabledTests();
 });
--- a/devtools/client/webconsole/test/browser/browser_jsterm_editor_execute.js
+++ b/devtools/client/webconsole/test/browser/browser_jsterm_editor_execute.js
@@ -6,17 +6,16 @@
 // See https://bugzilla.mozilla.org/show_bug.cgi?id=1519313
 
 "use strict";
 
 const TEST_URI =
   "data:text/html;charset=utf-8,Web Console test for bug 1519313";
 
 add_task(async function() {
-  await pushPref("devtools.webconsole.features.editor", true);
   await pushPref("devtools.webconsole.input.editor", true);
   const hud = await openNewTabAndConsole(TEST_URI);
 
   const expression = `x = 10`;
   setInputValue(hud, expression);
   await executeAndWaitForMessage(hud, undefined, "", ".result");
   is(getInputValue(hud), expression, "input line is not cleared after submit");
 });
--- a/devtools/client/webconsole/test/browser/browser_jsterm_editor_execute_selection.js
+++ b/devtools/client/webconsole/test/browser/browser_jsterm_editor_execute_selection.js
@@ -6,17 +6,16 @@
 // See https://bugzilla.mozilla.org/show_bug.cgi?id=1576563
 
 "use strict";
 
 const TEST_URI =
   "data:text/html;charset=utf-8,Web Console test for executing input selection";
 
 add_task(async function() {
-  await pushPref("devtools.webconsole.features.editor", true);
   await pushPref("devtools.webconsole.input.editor", true);
   const hud = await openNewTabAndConsole(TEST_URI);
 
   const expression = `x = 10;x;
     x = 20;x;`;
 
   info("Evaluate the whole expression");
   setInputValue(hud, expression);
--- a/devtools/client/webconsole/test/browser/browser_jsterm_editor_gutter.js
+++ b/devtools/client/webconsole/test/browser/browser_jsterm_editor_gutter.js
@@ -5,17 +5,16 @@
 // 'devtools.webconsole.input.editor' is true.
 // See https://bugzilla.mozilla.org/show_bug.cgi?id=1519315
 
 "use strict";
 
 const TEST_URI = "data:text/html;charset=utf-8,Test JsTerm editor line gutters";
 
 add_task(async function() {
-  await pushPref("devtools.webconsole.features.editor", true);
   await pushPref("devtools.webconsole.input.editor", true);
 
   const hud = await openNewTabAndConsole(TEST_URI);
 
   info("Check that the line numbers gutter is rendered when in editor layout");
   ok(
     getLineNumbersGutterElement(hud),
     "line numbers gutter is rendered on the input when in editor mode."
--- a/devtools/client/webconsole/test/browser/browser_jsterm_editor_onboarding.js
+++ b/devtools/client/webconsole/test/browser/browser_jsterm_editor_onboarding.js
@@ -3,23 +3,21 @@
 
 // Test that the onboarding UI is displayed when first displaying the editor mode, and
 // that it can be permanentely dismissed.
 // See https://bugzilla.mozilla.org/show_bug.cgi?id=1558417
 
 "use strict";
 
 const TEST_URI = "data:text/html;charset=utf-8,Test onboarding UI";
-const EDITOR_FEATURE_PREF = "devtools.webconsole.features.editor";
 const EDITOR_UI_PREF = "devtools.webconsole.input.editor";
 const EDITOR_ONBOARDING_PREF = "devtools.webconsole.input.editorOnboarding";
 
 add_task(async function() {
   // Enable editor mode and force the onboarding pref to true so it's displayed.
-  await pushPref(EDITOR_FEATURE_PREF, true);
   await pushPref(EDITOR_UI_PREF, true);
   await pushPref(EDITOR_ONBOARDING_PREF, true);
 
   let hud = await openNewTabAndConsole(TEST_URI);
 
   info("Check that the onboarding UI is displayed");
   const onboardingElement = getOnboardingEl(hud);
   ok(onboardingElement, "The onboarding UI exists");
@@ -38,16 +36,15 @@ add_task(async function() {
   await closeConsole();
   hud = await openConsole();
   is(
     getOnboardingEl(hud),
     null,
     "The onboarding UI isn't displayed after a toolbox restart after being dismissed"
   );
 
-  Services.prefs.clearUserPref(EDITOR_FEATURE_PREF);
   Services.prefs.clearUserPref(EDITOR_UI_PREF);
   Services.prefs.clearUserPref(EDITOR_ONBOARDING_PREF);
 });
 
 function getOnboardingEl(hud) {
   return hud.ui.outputNode.querySelector(".editor-onboarding");
 }
--- a/devtools/client/webconsole/test/browser/browser_jsterm_editor_resize.js
+++ b/devtools/client/webconsole/test/browser/browser_jsterm_editor_resize.js
@@ -4,17 +4,16 @@
 // Test that the editor can be resized and that its width is persisted.
 
 "use strict";
 
 const TEST_URI =
   "data:text/html;charset=utf-8,Web Console test for editor resize";
 
 add_task(async function() {
-  await pushPref("devtools.webconsole.features.editor", true);
   await pushPref("devtools.webconsole.input.editor", true);
   await pushPref("devtools.webconsole.input.editorOnboarding", false);
 
   // Reset editorWidth pref so we have steady results when running multiple times.
   await pushPref("devtools.webconsole.input.editorWidth", null);
 
   let hud = await openNewTabAndConsole(TEST_URI);
   const getEditorEl = () =>
--- a/devtools/client/webconsole/test/browser/browser_jsterm_editor_reverse_search_button.js
+++ b/devtools/client/webconsole/test/browser/browser_jsterm_editor_reverse_search_button.js
@@ -2,17 +2,16 @@
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 const TEST_URI =
   "data:text/html;charset=utf-8,Web Console test for bug 1567372";
 
 add_task(async function() {
-  await pushPref("devtools.webconsole.features.editor", true);
   await pushPref("devtools.webconsole.input.editor", true);
 
   const hud = await openNewTabAndConsole(TEST_URI);
 
   info("Searching for `.webconsole-editor-toolbar`");
   const editorToolbar = hud.ui.outputNode.querySelector(
     ".webconsole-editor-toolbar"
   );
--- a/devtools/client/webconsole/test/browser/browser_jsterm_editor_toggle_keyboard_shortcut.js
+++ b/devtools/client/webconsole/test/browser/browser_jsterm_editor_toggle_keyboard_shortcut.js
@@ -6,18 +6,16 @@
 
 "use strict";
 
 const TEST_URI =
   "data:text/html;charset=utf-8,Test editor mode toggle keyboard shortcut";
 const EDITOR_PREF = "devtools.webconsole.input.editor";
 
 add_task(async function() {
-  await pushPref("devtools.webconsole.features.editor", true);
-
   // Start with the editor turned off
   await pushPref(EDITOR_PREF, false);
   let hud = await openNewTabAndConsole(TEST_URI);
 
   const INPUT_VALUE = "hello";
   setInputValue(hud, INPUT_VALUE);
 
   is(isEditorModeEnabled(hud), false, "The console isn't in editor mode");
--- a/devtools/client/webconsole/test/browser/browser_jsterm_editor_toolbar.js
+++ b/devtools/client/webconsole/test/browser/browser_jsterm_editor_toolbar.js
@@ -3,17 +3,16 @@
 
 // Check that the editor toolbar works as expected when in editor mode.
 
 "use strict";
 
 const TEST_URI = "data:text/html;charset=utf8,<p>Test editor toolbar";
 
 add_task(async function() {
-  await pushPref("devtools.webconsole.features.editor", true);
   await pushPref("devtools.webconsole.input.editor", false);
 
   const tab = await addTab(TEST_URI);
   let hud = await openConsole(tab);
 
   info("Test that the toolbar is not displayed when in editor mode");
   let toolbar = getEditorToolbar(hud);
   is(toolbar, null, "The toolbar isn't displayed when not in editor mode");
--- a/devtools/client/webconsole/test/browser/browser_jsterm_no_input_and_tab_key_pressed.js
+++ b/devtools/client/webconsole/test/browser/browser_jsterm_no_input_and_tab_key_pressed.js
@@ -4,20 +4,16 @@
 "use strict";
 
 // See Bug 583816.
 
 const TEST_URI =
   "data:text/html,<meta charset=utf8>Testing jsterm with no input";
 
 add_task(async function() {
-  // For now, let's disable editor as we don't know what the final placement of the
-  // open editor button (which may impact this test).
-  await pushPref("devtools.webconsole.features.editor", false);
-
   const hud = await openNewTabAndConsole(TEST_URI);
   const jsterm = hud.jsterm;
 
   info("Check that hitting Tab when input is empty insert blur the input");
   jsterm.focus();
   setInputValue(hud, "");
   EventUtils.synthesizeKey("KEY_Tab");
   is(getInputValue(hud), "", "inputnode is empty - matched");
@@ -25,21 +21,30 @@ add_task(async function() {
 
   info("Check that hitting Shift+Tab when input is empty blur the input");
   jsterm.focus();
   EventUtils.synthesizeKey("KEY_Tab", { shiftKey: true });
   is(getInputValue(hud), "", "inputnode is empty - matched");
   ok(!isInputFocused(hud), "input isn't focused anymore");
   ok(
     hasFocus(
+      hud.ui.outputNode.querySelector(".webconsole-input-openEditorButton")
+    ),
+    `The "Toggle Editor" button is now focused`
+  );
+
+  info("Check that hitting Shift+Tab again place the focus on the filter bar");
+  EventUtils.synthesizeKey("KEY_Tab", { shiftKey: true });
+  ok(
+    hasFocus(
       hud.ui.outputNode.querySelector(
         ".webconsole-console-settings-menu-button"
       )
     ),
-    `The "Console Settings" menu button is now focused`
+    `The "Console Settings" button is now focused`
   );
 
   info("Check that hitting Tab when input is not empty insert a tab");
   jsterm.focus();
 
   const testString = "window.Bug583816";
   await setInputValueForAutocompletion(hud, testString, 0);
   checkInputValueAndCursorPosition(
--- a/devtools/client/webconsole/test/browser/browser_webconsole_telemetry_execute_js.js
+++ b/devtools/client/webconsole/test/browser/browser_webconsole_telemetry_execute_js.js
@@ -6,18 +6,16 @@
 // when evaluating expressions.
 
 "use strict";
 
 const TEST_URI = `data:text/html,<meta charset=utf8>Test execute_js telemetry event`;
 const ALL_CHANNELS = Ci.nsITelemetry.DATASET_ALL_CHANNELS;
 
 add_task(async function() {
-  await pushPref("devtools.webconsole.features.editor", true);
-
   // Let's reset the counts.
   Services.telemetry.clearEvents();
 
   // Ensure no events have been logged
   const snapshot = Services.telemetry.snapshotEvents(ALL_CHANNELS, true);
   ok(!snapshot.parent, "No events have been logged for the main process");
 
   const hud = await openNewTabAndConsole(TEST_URI);
--- a/devtools/client/webconsole/test/node/mocha-test-setup.js
+++ b/devtools/client/webconsole/test/node/mocha-test-setup.js
@@ -22,17 +22,16 @@ pref("devtools.webconsole.filter.netxhr"
 pref("devtools.webconsole.inputHistoryCount", 300);
 pref("devtools.webconsole.persistlog", false);
 pref("devtools.webconsole.timestampMessages", false);
 pref("devtools.webconsole.sidebarToggle", true);
 pref("devtools.webconsole.groupWarningMessages", false);
 pref("devtools.webconsole.input.editor", false);
 pref("devtools.webconsole.input.autocomplete", true);
 pref("devtools.browserconsole.contentMessages", true);
-pref("devtools.webconsole.features.editor", true);
 pref("devtools.webconsole.input.editorWidth", 800);
 pref("devtools.webconsole.input.editorOnboarding", true);
 
 global.loader = {
   lazyServiceGetter: () => {},
   lazyGetter: (context, name, fn) => {
     try {
       global[name] = fn();
--- a/devtools/client/webconsole/webconsole-wrapper.js
+++ b/devtools/client/webconsole/webconsole-wrapper.js
@@ -108,25 +108,23 @@ class WebConsoleWrapper {
 
       if (this.toolbox) {
         this.toolbox.threadFront.on("paused", this.dispatchPaused);
         this.toolbox.threadFront.on("progress", this.dispatchProgress);
       }
 
       const { prefs } = store.getState();
       const autocomplete = prefs.autocomplete;
-      const editorFeatureEnabled = prefs.editor;
 
       const app = App({
         serviceContainer,
         webConsoleUI,
         onFirstMeaningfulPaint: resolve,
         closeSplitConsole: this.closeSplitConsole.bind(this),
         autocomplete,
-        editorFeatureEnabled,
         hidePersistLogsCheckbox:
           webConsoleUI.isBrowserConsole || webConsoleUI.isBrowserToolboxConsole,
         hideShowContentMessagesCheckbox:
           !webConsoleUI.isBrowserConsole &&
           !webConsoleUI.isBrowserToolboxConsole,
       });
 
       // Render the root Application component.