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

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

Issue 2278203003: DevTools: Allow shadow-editor value manipulation with arrow keys and mousewheel (Closed)
Patch Set: Add return annotations Created 4 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 | third_party/WebKit/Source/devtools/front_end/ui/CSSShadowEditor.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 bb293129500f6e85055a23a928080fcba904dae4..0d33461d0cab4c58eceabc08ddc92bc44206e657 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/Spectrum.js
+++ b/third_party/WebKit/Source/devtools/front_end/components/Spectrum.js
@@ -823,15 +823,11 @@ WebInspector.Spectrum.prototype = {
}
var inputElement = /** @type {!Element} */(event.currentTarget);
- var arrowKeyOrMouseWheelEvent = (event.key === "ArrowUp" || event.key === "ArrowDown" || event.type === "mousewheel");
- var pageKeyPressed = (event.key === "PageUp" || event.key === "PageDown");
- if (arrowKeyOrMouseWheelEvent || pageKeyPressed) {
- var newValue = WebInspector.createReplacementString(inputElement.value, event);
- if (newValue) {
- inputElement.value = newValue;
- inputElement.selectionStart = 0;
- inputElement.selectionEnd = newValue.length;
- }
+ var newValue = WebInspector.createReplacementString(inputElement.value, event);
+ if (newValue) {
+ inputElement.value = newValue;
+ inputElement.selectionStart = 0;
+ inputElement.selectionEnd = newValue.length;
event.consume(true);
}
@@ -841,7 +837,7 @@ WebInspector.Spectrum.prototype = {
colorString = this._hexValue.value;
} else {
var format = this._colorFormat === cf.RGB ? "rgba" : "hsla";
- var values = this._textValues.map(elementValue).join(",");
+ var values = this._textValues.map(elementValue).join(", ");
colorString = String.sprintf("%s(%s)", format, values);
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/CSSShadowEditor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698