| Index: Source/core/page/SpatialNavigation.cpp
|
| diff --git a/Source/core/page/SpatialNavigation.cpp b/Source/core/page/SpatialNavigation.cpp
|
| index cb014f916c282beaef9813d6078bd17a04fbcadd..7e62a60271dd9970cc2f16e692814cd5c3dee36c 100644
|
| --- a/Source/core/page/SpatialNavigation.cpp
|
| +++ b/Source/core/page/SpatialNavigation.cpp
|
| @@ -439,7 +439,7 @@ Node* scrollableEnclosingBoxOrParentFrameForNodeInDirection(FocusDirection direc
|
| if (parent->isDocumentNode())
|
| parent = toDocument(parent)->document()->frame()->ownerElement();
|
| else
|
| - parent = parent->parentNode();
|
| + parent = parent->parentOrShadowHostNode();
|
| } while (parent && !canScrollInDirection(parent, direction) && !parent->isDocumentNode());
|
|
|
| return parent;
|
|
|