| Index: Source/core/dom/Element.cpp
|
| diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
|
| index 29b4db06fdf6d4fd32fe08c5276991ba52010a8a..8463fade32682daf55374a142ba914802c5e9762 100644
|
| --- a/Source/core/dom/Element.cpp
|
| +++ b/Source/core/dom/Element.cpp
|
| @@ -2209,9 +2209,9 @@ void Element::focus(bool restorePreviousSelection, WebFocusType type)
|
| return;
|
|
|
| // Slide the focus to its inner node.
|
| - Node* next = document().page()->focusController().findFocusableNode(WebFocusTypeForward, *this);
|
| - if (next && next->isElementNode() && containsIncludingShadowDOM(next)) {
|
| - toElement(next)->focus(false, WebFocusTypeForward);
|
| + Element* next = document().page()->focusController().findFocusableElement(WebFocusTypeForward, *this);
|
| + if (next && containsIncludingShadowDOM(next)) {
|
| + next->focus(false, WebFocusTypeForward);
|
| return;
|
| }
|
| }
|
|
|