neo
neo copied to clipboard
manager.Focus: tree walking
trafficstars
I think we can do better here:
Right now, we parse the DOM paths and map them to related neo components. While this does work fine for nested widgets inside the DOM tree, it does not honor overlays as good as it should.
We should only fetch the closest component inside the focusin & focusout path and from there use the component tree.
- find the closest common ancestor
- walk the out path component tree upwards and fire
focusLeave - walk the in path component tree upwards and fire
focusEnter - fire
focusMoveon the common ancestor
It relies on floating components to be placed inside the component tree correctly.
@rwaters