mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Accessibility: Only call grabKeyboardFocus() on focusable components
This commit is contained in:
parent
edd4ff9cfc
commit
fd8c6ce15c
1 changed files with 5 additions and 1 deletions
|
|
@ -319,8 +319,12 @@ void AccessibilityHandler::takeFocus()
|
|||
currentlyFocusedHandler = this;
|
||||
notifyAccessibilityEventInternal (*this, InternalAccessibilityEvent::focusChanged);
|
||||
|
||||
if (component.getWantsKeyboardFocus() && ! component.hasKeyboardFocus (true))
|
||||
if ((component.isShowing() || component.isOnDesktop())
|
||||
&& component.getWantsKeyboardFocus()
|
||||
&& ! component.hasKeyboardFocus (true))
|
||||
{
|
||||
component.grabKeyboardFocus();
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue