Skip to content

Avoid unmounting oc-components during DOM moves#1516

Merged
ricardo-devis-agullo merged 1 commit into
masterfrom
fix/oc-client-dom-move-lifecycle
Jul 14, 2026
Merged

Avoid unmounting oc-components during DOM moves#1516
ricardo-devis-agullo merged 1 commit into
masterfrom
fix/oc-client-dom-move-lifecycle

Conversation

@ricardo-devis-agullo

Copy link
Copy Markdown
Collaborator

Summary

  • Defer custom element unmount work until after the current tick
  • Skip unmounting if the element was only moved and is connected again
  • Add a regression test for moving rendered oc-component nodes in the DOM

Test plan

  • npm --prefix "/Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc-client-browser" run build
  • cd "/Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc-client-browser" && npx playwright test tests/customElementsDomMove.spec.js tests/customElements.spec.js --reporter=list

Generated with Devin

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@ricardo-devis-agullo ricardo-devis-agullo merged commit 7dcfc28 into master Jul 14, 2026
3 checks passed
@ricardo-devis-agullo ricardo-devis-agullo deleted the fix/oc-client-dom-move-lifecycle branch July 14, 2026 08:16
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.

1 participant