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

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

Issue 1172733002: Devtools: Fix ctrl-z in ColorPicker (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 2f31ba786469d3ce27a48dda7eb687786dcbd153..6dea52d02249c4e5bafb8a44222724aee044afe3 100644
--- a/Source/devtools/front_end/elements/Spectrum.js
+++ b/Source/devtools/front_end/elements/Spectrum.js
@@ -305,9 +305,14 @@ WebInspector.Spectrum.prototype = {
*/
_checkForTabEvent: function(event)
{
+ if (isEscKey(event) || isEnterKey(event))
pfeldman 2015/06/09 18:24:08 For consistency, we could call WebInspector.markBe
+ return;
+
var sibling = event.shiftKey ? event.target.previousSibling : event.target.nextSibling;
- if (event.code !== "Tab" || !sibling || !sibling.classList.contains("spectrum-text-value"))
+ if (event.code !== "Tab" || !sibling || !sibling.classList.contains("spectrum-text-value")) {
+ event.consume();
return;
+ }
sibling.getComponentSelection().setBaseAndExtent(sibling, 0, sibling, 1);
event.consume(true);
},
« 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