Skip to content

Conversation

Sekhmet
Copy link
Contributor

@Sekhmet Sekhmet commented Aug 25, 2025

Closes: #3752
Reuses code from: #3704

Right now touchend only checks if target is HTMLElement, but this check will fail for some other elements (like SVG elements).

This change brings dom utils from #3704 to Vue to properly resolve target.

Before:

Screen.Recording.2025-08-25.at.16.28.48.mov

After:

Screen.Recording.2025-08-25.at.16.28.15.mov

Closes: tailwindlabs#3752
Reuses code from: tailwindlabs#3704

Right now `touchend` only checks if target is HTMLElement, but this
check will fail for some other elements (like SVG elements).

This change brings dom utils from tailwindlabs#3704 to Vue to properly resolve
target.
Copy link

vercel bot commented Aug 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
headlessui-react Ready Ready Preview Comment Sep 1, 2025 10:26am
headlessui-vue Ready Ready Preview Comment Sep 1, 2025 10:26am

Copy link
Member

@RobinMalfait RobinMalfait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@RobinMalfait RobinMalfait enabled auto-merge (squash) September 1, 2025 10:25
@RobinMalfait RobinMalfait merged commit 8afe84d into tailwindlabs:main Sep 1, 2025
8 checks passed
@RobinMalfait RobinMalfait changed the title fix(vue): handle outsideClick touchend event on SVG elements Ensure outside click properly works when clicking SVG elements Sep 1, 2025
@Sekhmet Sekhmet deleted the sekhmet/svg-element-focus branch September 1, 2025 10:48
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.

[Vue] Menu closing issue when using an svg in the MenuButton (only for touch event)
2 participants