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

Unified Diff: ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js

Issue 2792853003: WebUI: For cr-dialog, make Enter key ignore disabled or hidden buttons (Closed)
Patch Set: update test descriptions Created 3 years, 8 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 | « chrome/test/data/webui/cr_elements/cr_dialog_test.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js
diff --git a/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js b/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js
index d598988232d717b2ce4eae42d65783c6a61e4ceb..0e197fa099552776aee1e43f7e083202f6fc77ca 100644
--- a/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js
+++ b/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js
@@ -118,8 +118,9 @@ Polymer({
if (e.key != 'Enter')
return;
- var actionButton = this.querySelector('.action-button');
- if (actionButton && !actionButton.disabled) {
+ var actionButton =
+ this.querySelector('.action-button:not([disabled]):not([hidden])');
+ if (actionButton) {
actionButton.click();
e.preventDefault();
}
« no previous file with comments | « chrome/test/data/webui/cr_elements/cr_dialog_test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698