Bug 1203147 - Add a keyboard shortcut for the 'scroll into view' contextual menu action in the inspector, r=pbro
☠☠ backed out by 9a7520bca416 ☠ ☠
authorJon Droniak <droniakj1@owls.southernct.edu>
Sat, 19 Sep 2015 11:19:07 +0200
changeset 296017 d52326f55d2e24bd3a700d4bf60f9ce0c16b03bd
parent 296016 f33142322571d4a84728aa03f6378ff1211c597e
child 296018 a565f782ec8799bc85eac3b999bf1d21814c2069
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspbro
bugs1203147
milestone43.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 1203147 - Add a keyboard shortcut for the 'scroll into view' contextual menu action in the inspector, r=pbro
browser/devtools/markupview/markup-view.js
--- a/browser/devtools/markupview/markup-view.js
+++ b/browser/devtools/markupview/markup-view.js
@@ -648,16 +648,21 @@ MarkupView.prototype = {
         break;
       }
       case Ci.nsIDOMKeyEvent.DOM_VK_ESCAPE: {
         if (this.isDragging) {
           this.cancelDragging();
           break;
         }
       }
+      case Ci.nsIDOMKeyEvent.DOM_VK_S: {
+        let selection = this._selectedContainer.node;
+        this._inspector.scrollNodeIntoView(selection);
+        break;
+      }
       default:
         handled = false;
     }
     if (handled) {
       aEvent.stopPropagation();
       aEvent.preventDefault();
     }
   },