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

Unified Diff: chrome/browser/resources/settings/on_startup_page/startup_url_dialog.js

Issue 2653023003: MD Settings: Update some dialogs to accept Enter key. (Closed)
Patch Set: add a test for one of them Created 3 years, 11 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: chrome/browser/resources/settings/on_startup_page/startup_url_dialog.js
diff --git a/chrome/browser/resources/settings/on_startup_page/startup_url_dialog.js b/chrome/browser/resources/settings/on_startup_page/startup_url_dialog.js
index c3b619cdae92f5e1738ddac2b7feeea258c9d11d..779516e873a5c6d23b1b5d6d9c4d93e38079d016 100644
--- a/chrome/browser/resources/settings/on_startup_page/startup_url_dialog.js
+++ b/chrome/browser/resources/settings/on_startup_page/startup_url_dialog.js
@@ -67,6 +67,15 @@ Polymer({
}.bind(this));
},
+ /**
+ * @param {!KeyboardEvent} e
+ * @private
+ */
+ onKeypress_: function(e) {
+ if (e.key == 'Enter' && !this.$.actionButton.disabled)
+ this.onActionButtonTap_();
+ },
+
/** @private */
validate_: function() {
this.browserProxy_.validateStartupPage(this.url_).then(function(isValid) {

Powered by Google App Engine
This is Rietveld 408576698