| Index: third_party/WebKit/Source/core/input/EventHandler.cpp
|
| diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp
|
| index 917872c7b405c75bd4f234396c0fcd417ddc116c..55c6af53a347d9b75e65a5db4eb315875cff7f62 100644
|
| --- a/third_party/WebKit/Source/core/input/EventHandler.cpp
|
| +++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
|
| @@ -1716,10 +1716,10 @@ bool EventHandler::slideFocusOnShadowHostIfNecessary(const Element& element)
|
| // If the host has a focusable inner element, focus it. Otherwise, the host takes focus.
|
| Page* page = m_frame->page();
|
| ASSERT(page);
|
| - Element* next = page->focusController().findFocusableElement(WebFocusTypeForward, *element.authorShadowRoot());
|
| - if (next && element.containsIncludingShadowDOM(next)) {
|
| + Element* found = page->focusController().findFocusableElementInShadowHost(element);
|
| + if (found && element.containsIncludingShadowDOM(found)) {
|
| // Use WebFocusTypeForward instead of WebFocusTypeMouse here to mean the focus has slided.
|
| - next->focus(FocusParams(SelectionBehaviorOnFocus::Reset, WebFocusTypeForward, nullptr));
|
| + found->focus(FocusParams(SelectionBehaviorOnFocus::Reset, WebFocusTypeForward, nullptr));
|
| return true;
|
| }
|
| }
|
|
|