Browse Source

Accessibility: Fix potential infinite recursive component keyboard focus loop

v6.1.6
ed 4 years ago
parent
commit
46a4dc95a1
1 changed files with 8 additions and 4 deletions
  1. +8
    -4
      modules/juce_gui_basics/components/juce_Component.cpp

+ 8
- 4
modules/juce_gui_basics/components/juce_Component.cpp 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)


Loading…
Cancel
Save