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

Accessibility: Fix focus transfer issue when hiding modal components

This commit is contained in:
ed 2021-07-28 15:40:53 +01:00
parent c66e8baf7e
commit 5d7f59a19d

View file

@ -75,10 +75,11 @@ AccessibilityHandler::~AccessibilityHandler()
//==============================================================================
AccessibleState AccessibilityHandler::getCurrentState() const
{
AccessibleState state;
if (component.isCurrentlyBlockedByAnotherModalComponent()
&& Component::getCurrentlyModalComponent()->isVisible())
return {};
if (! component.isCurrentlyBlockedByAnotherModalComponent())
state = state.withFocusable();
auto state = AccessibleState().withFocusable();
return hasFocus (false) ? state.withFocused() : state;
}