You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have in our app a FocusScope with children nodes and subnodes.
When I press ESC, the tree underneath the FocusScope is being removed, however the FocusScope in _focusedChildren still lists out indirect children that have been removed.
it looks like we're not updating the _focusedChildren of descendants when removing a child from its parent
I fixed it with this piece of code in _removeChild:
if (removeScopeFocus) {
final enclosingScope = node.enclosingScope;
if (enclosingScope != null) {
enclosingScope?._focusedChildren.remove(node);
for (final descendant in node.descendants) {
if (descendant.enclosingScope == enclosingScope)
enclosingScope?._focusedChildren.remove(descendant);
}
}
}
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
Add code for updating `focusedChild` when removing grandchildren from…
Reverts "Add code for updating `focusedChild` when removing grandchil…
github-actions commentedon Nov 2, 2023
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.