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

Unified Diff: third_party/WebKit/Source/devtools/front_end/components/Spectrum.js

Issue 2527503002: Revert of DevTools: all swatches should have a default focused element (Closed)
Patch Set: Created 4 years, 1 month 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 | third_party/WebKit/Source/devtools/front_end/ui/BezierEditor.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/components/Spectrum.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components/Spectrum.js b/third_party/WebKit/Source/devtools/front_end/components/Spectrum.js
index 7d9828676ae37c72bf7bb7c0ceea9ae31d387b34..ee5e40b0dd739739ec72e819a50abc8bfeb39324 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/Spectrum.js
+++ b/third_party/WebKit/Source/devtools/front_end/components/Spectrum.js
@@ -208,8 +208,14 @@
return;
if (show)
this._updatePalettePanel();
+ this._focus();
this._palettePanelShowing = show;
this.contentElement.classList.toggle('palette-panel-showing', show);
+ }
+
+ _focus() {
+ if (this.isShowing())
+ this.contentElement.focus();
}
/**
@@ -269,6 +275,7 @@
}
this._togglePalettePanel(false);
+ this._focus();
}
/**
@@ -307,6 +314,7 @@
this._shadesContainer.appendChild(shadeElement);
}
+ this._shadesContainer.focus();
this._shadesCloseHandler = closeLightnessShades.bind(this, colorElement);
this._shadesContainer.ownerDocument.addEventListener('mousedown', this._shadesCloseHandler, true);
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/BezierEditor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698