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

Unified Diff: Source/devtools/front_end/ui/SettingsUI.js

Issue 315003008: [DevTools] UI for network conditions emulation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
Index: Source/devtools/front_end/ui/SettingsUI.js
diff --git a/Source/devtools/front_end/ui/SettingsUI.js b/Source/devtools/front_end/ui/SettingsUI.js
index a3dc3f0018b29d92582ff889e218cebe382712cf..210bbbee721e08aedece1376f1504acfa0a6106e 100644
--- a/Source/devtools/front_end/ui/SettingsUI.js
+++ b/Source/devtools/front_end/ui/SettingsUI.js
@@ -109,6 +109,7 @@ WebInspector.SettingsUI.createSettingInputField = function(label, setting, numer
inputElement.addEventListener("change", onInput, false);
inputElement.addEventListener("input", onInput, false);
}
+ inputElement.addEventListener("keydown", onKeyDown, false);
var errorMessageLabel;
if (validatorCallback) {
@@ -125,6 +126,12 @@ WebInspector.SettingsUI.createSettingInputField = function(label, setting, numer
apply();
}
+ function onKeyDown(event)
+ {
+ if (isEnterKey(event))
+ apply();
+ }
+
function validate()
{
var error = validatorCallback(inputElement.value);

Powered by Google App Engine
This is Rietveld 408576698