LearnNewsExamplesServices
Frontmatter
id6129
titlemanager.Focus: tree walking
stateOpen
labels
enhancementno auto close
assignees[]
createdAtNov 22, 2024, 2:01 PM
updatedAtApr 5, 2025, 5:31 PM
githubUrlhttps://github.com/neomjs/neo/issues/6129
authortobiu
commentsCount2
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]

manager.Focus: tree walking

Openenhancementno auto close
tobiu
tobiu commented on Nov 22, 2024, 2:01 PM

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 added the enhancement label on Nov 22, 2024, 2:01 PM
tobiu reopened this issue on Apr 5, 2025, 5:31 PM
tobiu removed the stale label on Apr 5, 2025, 5:31 PM
tobiu added the no auto close label on Apr 5, 2025, 5:31 PM