neo icon indicating copy to clipboard operation
neo copied to clipboard

manager.Focus: tree walking

Open tobiu opened this issue 11 months ago • 2 comments
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.

  1. find the closest common ancestor
  2. walk the out path component tree upwards and fire focusLeave
  3. walk the in path component tree upwards and fire focusEnter
  4. fire focusMove on the common ancestor

It relies on floating components to be placed inside the component tree correctly.

@rwaters

tobiu avatar Nov 22 '24 13:11 tobiu