| Index: third_party/WebKit/Source/core/dom/Element.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
|
| index 60c32e64ee104c6820c6dee9d64bd1bfdbc161a6..54c1fcb8d6ca9e004ae00a76e8f7ccd2557c74fe 100644
|
| --- a/third_party/WebKit/Source/core/dom/Element.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Element.cpp
|
| @@ -2361,9 +2361,9 @@ void Element::focus(const FocusParams& params)
|
| return;
|
|
|
| // Slide the focus to its inner node.
|
| - Element* next = document().page()->focusController().findFocusableElement(WebFocusTypeForward, *this);
|
| - if (next && containsIncludingShadowDOM(next)) {
|
| - next->focus(FocusParams(SelectionBehaviorOnFocus::Reset, WebFocusTypeForward, nullptr));
|
| + Element* found = document().page()->focusController().findFocusableElementInShadowHost(*this);
|
| + if (found && containsIncludingShadowDOM(found)) {
|
| + found->focus(FocusParams(SelectionBehaviorOnFocus::Reset, WebFocusTypeForward, nullptr));
|
| return;
|
| }
|
| }
|
|
|