Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1359)

Unified Diff: Source/devtools/front_end/elements/Spectrum.js

Issue 486633002: DevTools: [SSP] Do not re-show color popover after going full-screen (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/elements/Spectrum.js
diff --git a/Source/devtools/front_end/elements/Spectrum.js b/Source/devtools/front_end/elements/Spectrum.js
index f831fbb099c5f13b78a040614a018a86122bc1e8..46b4e028ad72b1eb315f12cd32fe432ca7a8d64c 100644
--- a/Source/devtools/front_end/elements/Spectrum.js
+++ b/Source/devtools/front_end/elements/Spectrum.js
@@ -365,6 +365,7 @@ WebInspector.SpectrumPopupHelper.prototype = {
this.hide(true);
}
+ delete this._isHidden;
this._anchorElement = element;
this._spectrum.setColor(color);
@@ -372,6 +373,7 @@ WebInspector.SpectrumPopupHelper.prototype = {
this.reposition(element);
document.addEventListener("mousedown", this._hideProxy, false);
+ window.addEventListener("resize", this._hideProxy, false);
if (WebInspector.experimentsSettings.colorPicker.isEnabled()) {
WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel, WebInspector.ResourceTreeModel.EventTypes.ColorPicked, this._colorPicked, this);
PageAgent.setColorPickerEnabled(true);
@@ -392,11 +394,13 @@ WebInspector.SpectrumPopupHelper.prototype = {
*/
hide: function(commitEdit)
{
- if (!this._popover.isShowing())
+ if (this._isHidden)
return;
+ this._isHidden = true;
this._popover.hide();
document.removeEventListener("mousedown", this._hideProxy, false);
+ window.removeEventListener("resize", this._hideProxy, false);
if (WebInspector.experimentsSettings.colorPicker.isEnabled()) {
PageAgent.setColorPickerEnabled(false);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698