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

Accessibility: Fix potential infinite recursive component keyboard focus loop

This commit is contained in:
ed 2021-09-28 16:06:04 +01:00
parent c933ad5a16
commit 46a4dc95a1

View file

@ -2687,13 +2687,17 @@ void Component::internalKeyboardFocusGain (FocusChangeType cause,
{
focusGained (cause);
if (safePointer != nullptr)
{
if (safePointer == nullptr)
return;
if (hasKeyboardFocus (false))
if (auto* handler = getAccessibilityHandler())
handler->grabFocus();
internalChildKeyboardFocusChange (cause, safePointer);
}
if (safePointer == nullptr)
return;
internalChildKeyboardFocusChange (cause, safePointer);
}
void Component::internalKeyboardFocusLoss (FocusChangeType cause)