Index: Source/core/dom/Element.cpp |
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp |
index 7b03118ae897022f701741706f20b8edaf64215f..05df7d08097388a1ebc724ae38c9d0ef55d400be 100644 |
--- a/Source/core/dom/Element.cpp |
+++ b/Source/core/dom/Element.cpp |
@@ -2179,10 +2179,17 @@ bool Element::supportsSpatialNavigationFocus() const |
if (!document().settings() || !document().settings()->spatialNavigationEnabled()) |
return false; |
- return hasEventListeners(EventTypeNames::click) |
+ if (hasEventListeners(EventTypeNames::click) |
|| hasEventListeners(EventTypeNames::keydown) |
|| hasEventListeners(EventTypeNames::keypress) |
- || hasEventListeners(EventTypeNames::keyup); |
+ || hasEventListeners(EventTypeNames::keyup)) |
+ return true; |
+ if (!isSVGElement()) |
+ return false; |
+ return (hasEventListeners(EventTypeNames::focus) |
+ || hasEventListeners(EventTypeNames::blur) |
+ || hasEventListeners(EventTypeNames::focusin) |
+ || hasEventListeners(EventTypeNames::focusout)); |
} |
bool Element::isFocusable() const |