Bug 1584520 - Disable node picker and eyedropper before creating a new node r=devtools-inspector-reviewers,rcaliman
authorAdemílson F. Tonato <ademilsonft@outlook.com>
Tue, 01 Oct 2019 10:10:07 +0000
changeset 495803 1d391bb5799b3490cfc24a7c7c27f6ee7d2d2862
parent 495802 3d1e631287371207288925f188dcf9716cfc82d8
child 495804 0dfb6920936b6a65f2ef2567d094b0194a6f3d10
push id114140
push userdvarga@mozilla.com
push dateWed, 02 Oct 2019 18:04:51 +0000
treeherdermozilla-inbound@32eb0ea893f3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdevtools-inspector-reviewers, rcaliman
bugs1584520
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 1584520 - Disable node picker and eyedropper before creating a new node r=devtools-inspector-reviewers,rcaliman Differential Revision: https://phabricator.services.mozilla.com/D47461
devtools/client/inspector/inspector.js
--- a/devtools/client/inspector/inspector.js
+++ b/devtools/client/inspector/inspector.js
@@ -1750,16 +1750,22 @@ Inspector.prototype = {
    * Create a new node as the last child of the current selection, expand the
    * parent and select the new node.
    */
   async addNode() {
     if (!this.canAddHTMLChild()) {
       return;
     }
 
+    // turn off node picker when add node is triggered
+    this.toolbox.nodePicker.stop();
+
+    // turn off color picker when add node is triggered
+    this.hideEyeDropper();
+
     const html = "<div></div>";
 
     // Insert the html and expect a childList markup mutation.
     const onMutations = this.once("markupmutation");
     await this.walker.insertAdjacentHTML(
       this.selection.nodeFront,
       "beforeEnd",
       html