Very simple test case. Create and add a TextEditor, use the textEditorTextChanged
to update the screen. Make a timer that hides the text editor. Once it’s hidden you can still type into it.
Code: juce_bugs/PluginEditor.h at master · FigBug/juce_bugs · GitHub
Video: Screen Recording 2021 01 21 at 3 30 41 PM - YouTube
Issue:
if (! shouldBeVisible)
{
ComponentHelpers::releaseAllCachedImageResources (*this);
if (currentlyFocusedComponent == this || isParentOf (currentlyFocusedComponent))
{
if (parentComponent != nullptr)
parentComponent->grabKeyboardFocus();
else
giveAwayFocus (true);
}
}
When a component is hidden, focus is given away to the parent. However, it is not checked that the parent actually took the focus. If the parent doesn’t want the focus, then it should be cleared.