Bug 1348271 - attach eyedropper click event to the proper element;r=gl
authorJulian Descottes <jdescottes@mozilla.com>
Fri, 17 Mar 2017 12:50:28 +0100
changeset 348151 0d33d81b075fc1cdc2c497efdd43346b89864604
parent 348150 1da2122f3597fc4ab0c913152f98c47ee1b4ec99
child 348152 78e70d84203d4a875b6da574dd2e07f01d13fa41
child 348245 85ead1312fe6ca35789595f455788b599f599c9f
push id39079
push userjdescottes@mozilla.com
push dateFri, 17 Mar 2017 13:00:49 +0000
treeherderautoland@0d33d81b075f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgl
bugs1348271
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 1348271 - attach eyedropper click event to the proper element;r=gl MozReview-Commit-ID: GNb6WED0CiP
devtools/client/shared/widgets/tooltip/SwatchColorPickerTooltip.js
--- a/devtools/client/shared/widgets/tooltip/SwatchColorPickerTooltip.js
+++ b/devtools/client/shared/widgets/tooltip/SwatchColorPickerTooltip.js
@@ -112,18 +112,17 @@ SwatchColorPickerTooltip.prototype = Her
       this._originalColor = this.currentSwatchColor.textContent;
       let color = this.activeSwatch.style.backgroundColor;
       this.spectrum.off("changed", this._onSpectrumColorChange);
       this.spectrum.rgb = this._colorToRgba(color);
       this.spectrum.on("changed", this._onSpectrumColorChange);
       this.spectrum.updateUI();
     }
 
-    let tooltipDoc = this.tooltip.doc;
-    let eyeButton = tooltipDoc.querySelector("#eyedropper-button");
+    let eyeButton = this.tooltip.container.querySelector("#eyedropper-button");
     let canShowEyeDropper = yield this.inspector.supportsEyeDropper();
     if (canShowEyeDropper) {
       eyeButton.disabled = false;
       eyeButton.removeAttribute("title");
       eyeButton.addEventListener("click", this._openEyeDropper);
     } else {
       eyeButton.disabled = true;
       eyeButton.title = L10N.getStr("eyedropper.disabled.title");