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

Unified Diff: third_party/WebKit/Source/core/html/HTMLDialogElement.cpp

Issue 2125893003: HTMLDialogElement#showModal() should ignore unfocusable elements with [autofocus] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update dialog-autofocus-multiple-times.html Created 4 years, 5 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 | « third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/dialog-autofocus-multiple-times.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLDialogElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp b/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp
index 00e598d1d7b89154f2e09c91cc696a495fcf4ee8..3131829d390a848d04077586548d4dbef3860bf5 100644
--- a/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp
@@ -55,7 +55,7 @@ static void setFocusForDialog(HTMLDialogElement* dialog)
Element* element = toElement(node);
if (element->isFormControlElement()) {
HTMLFormControlElement* control = toHTMLFormControlElement(node);
- if (control->isAutofocusable()) {
+ if (control->isAutofocusable() && control->isFocusable()) {
control->focus();
return;
}
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/dialog-autofocus-multiple-times.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698