Skip to content

fix(UI5Element): make focus() synchronous when the shadow DOM is ready - #14118

Open
TeodorTaushanov wants to merge 10 commits into
mainfrom
ui5element_focus
Open

TeodorTaushanov wants to merge 10 commits into
mainfrom
ui5element_focus

Conversation

@TeodorTaushanov

@TeodorTaushanov TeodorTaushanov commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Now focus() focuses synchronously when the element is already rendered
and not queued for a (re-)render. If a render is still pending, it waits
for the DOM ref as before, since the focus DOM ref may be stale or missing.

Components that bypass it with their own focus-forwarding logic — like ToolbarItemBase.focusForToolbarNavigation(), which calls getFocusDomRef()?.focus() directly don't get that guarantee. In those cases the component must await this._waitForDomRef() explicitly before running its own logic, to ensure the DOM ref is ready.

fixes #14117

@TeodorTaushanov
TeodorTaushanov deployed to netlify-preview October 2, 2026 11:50 — with GitHub Actions Active
@sap-ui5-webcomponents-release

Copy link
Copy Markdown

@TeodorTaushanov
TeodorTaushanov deployed to netlify-preview October 2, 2026 14:04 — with GitHub Actions Active
@TeodorTaushanov TeodorTaushanov changed the title fix(UI5Element): make focus() synchronous when the shadow DOM is ready wip(UI5Element): make focus() synchronous when the shadow DOM is ready Oct 2, 2026
@TeodorTaushanov
TeodorTaushanov deployed to netlify-preview October 5, 2026 12:56 — with GitHub Actions Active
@TeodorTaushanov
TeodorTaushanov deployed to netlify-preview October 5, 2026 13:07 — with GitHub Actions Active
@TeodorTaushanov
TeodorTaushanov deployed to netlify-preview October 5, 2026 13:37 — with GitHub Actions Active
@TeodorTaushanov
TeodorTaushanov deployed to netlify-preview October 5, 2026 13:50 — with GitHub Actions Active
@TeodorTaushanov TeodorTaushanov changed the title wip(UI5Element): make focus() synchronous when the shadow DOM is ready fix(UI5Element): make focus() synchronous when the shadow DOM is ready Oct 6, 2026

This branch was successfully deployed

1 active deployment
netlify-preview — 772cfefc Deployed Oct 5, 2026 by TeodorTaushanov via deploy-preview #3441
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UI5Element] focus method is always async, even if the component is fully rendered

1 participant