1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Accessibility: Fix parent handler traversal when hit test handler is ignored in AccessibilityHandler::getChildAt()

This commit is contained in:
ed 2021-09-15 10:27:50 +01:00
parent d6fd33b38d
commit 30b37da39b

View file

@ -253,8 +253,11 @@ bool AccessibilityHandler::isParentOf (const AccessibilityHandler* possibleChild
AccessibilityHandler* AccessibilityHandler::getChildAt (Point<int> screenPoint)
{
if (auto* comp = Desktop::getInstance().findComponentAt (screenPoint))
if (isParentOf (comp->getAccessibilityHandler()))
return getUnignoredAncestor (findEnclosingHandler (comp));
{
if (auto* handler = getUnignoredAncestor (findEnclosingHandler (comp)))
if (isParentOf (handler))
return handler;
}
return nullptr;
}