Skip to content

fix: support drag handles inside shadow DOM#171

Open
driskull wants to merge 1 commit into
formkit:mainfrom
driskull:dris0000/shadow-dom-handle-selector
Open

fix: support drag handles inside shadow DOM#171
driskull wants to merge 1 commit into
formkit:mainfrom
driskull:dris0000/shadow-dom-handle-selector

Conversation

@driskull
Copy link
Copy Markdown

Summary

  • update drag handle validation to use the event composed path instead of point-based DOM lookup
  • allow drag handle matching to work for handles rendered inside nested shadow roots
  • update Playwright drag helpers so native and synthetic drag tests can target shadow-root elements
  • add draghandle-shadow test coverage and a dedicated test page for the scenario

Why

Drag handles rendered inside shadow DOM were not recognized reliably because validation only queried light-DOM descendants from the draggable node. This change makes drag handle detection event-aware and shadow-DOM compatible.

Testing

  • add native drag Playwright coverage for drag handles inside shadow DOM
  • add synthetic drag Playwright coverage for drag handles inside shadow DOM
  • verify dragging from the item body does not reorder
  • verify dragging from the shadow-root handle reorders items as expected

#170

@vercel
Copy link
Copy Markdown

vercel Bot commented May 18, 2026

@driskull is attempting to deploy a commit to the Formkit Team on Vercel.

A member of the Team first needs to authorize it.

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