Commit ad2dccf9 authored by Hixie's avatar Hixie

Fix focus bug that was breaking nested navigators

Turns out we were assuming that once the global key is gone, our
listener is unregistered. It isn't.

I'm planning on adding a test as part of my nested navigator work.
parent ba105468
......@@ -192,6 +192,7 @@ class FocusState extends State<Focus> {
void _scopeRemoved(GlobalKey key) {
assert(_focusedScope == key);
GlobalKey.unregisterRemoveListener(_currentlyRegisteredScopeRemovalListenerKey, _scopeRemoved);
_currentlyRegisteredScopeRemovalListenerKey = null;
setState(() {
_focusedScope = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment