Bug 1352776 - Make ReadOnlyEditor in the inspector also tabbable like other editors; r=jdescottes
authorPatrick Brosset <pbrosset@mozilla.com>
Tue, 25 Apr 2017 14:49:42 +0200
changeset 355997 21ea46a299d520aa733c71432d2fe0fd4e33d04e
parent 355996 0cb6f9f404dcda29cfbca9c2414831c9e2f01af6
child 355998 44787187502ce90ad01aee317f90fc0b83d7d3c0
push id31754
push userkwierso@gmail.com
push dateWed, 03 May 2017 00:28:51 +0000
treeherdermozilla-central@5eaf2d70eded [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes
bugs1352776
milestone55.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 1352776 - Make ReadOnlyEditor in the inspector also tabbable like other editors; r=jdescottes MozReview-Commit-ID: 2gfD9QdNC8B
devtools/client/inspector/markup/views/read-only-editor.js
--- a/devtools/client/inspector/markup/views/read-only-editor.js
+++ b/devtools/client/inspector/markup/views/read-only-editor.js
@@ -18,16 +18,19 @@ function ReadOnlyEditor(container, node)
     this.tag.classList.add("theme-fg-color5");
     this.tag.textContent = node.isBeforePseudoElement ? "::before" : "::after";
   } else if (node.nodeType == nodeConstants.DOCUMENT_TYPE_NODE) {
     this.elt.classList.add("comment", "doctype");
     this.tag.textContent = node.doctypeString;
   } else {
     this.tag.textContent = node.nodeName;
   }
+
+  // Make the "tag" part of this editor focusable.
+  this.tag.setAttribute("tabindex", "-1");
 }
 
 ReadOnlyEditor.prototype = {
   buildMarkup: function () {
     let doc = this.markup.doc;
 
     this.elt = doc.createElement("span");
     this.elt.classList.add("editor");