Skip to content

fix(@headlessui-vue): ensure Dialog on iOS works after touching disallowed area - #3889

Open
waterWang wants to merge 1 commit into
tailwindlabs:mainfrom
waterWang:fix/vue-ios-dialog-locking-3888
Open

fix(@headlessui-vue): ensure Dialog on iOS works after touching disallowed area#3889
waterWang wants to merge 1 commit into
tailwindlabs:mainfrom
waterWang:fix/vue-ios-dialog-locking-3888

Conversation

@waterWang

Copy link
Copy Markdown

Description

This PR ports the iOS touch locking fix from @headlessui/react (PR #3801) to @headlessui/vue.

Problem

The touchstart handler in handle-ios-locking.ts applies touchAction: none to elements touched outside the Dialog, but never clears those styles. Each touchstart event accumulates more styles, eventually making the Dialog unscrollable and unzoomable until closed and reopened.

Fix

Wrap the touchstart handler in d.group() and call _d.dispose() at the start of each touch. This disposes the previous group's side effects (reset styles) before applying new ones, exactly matching the fix already merged for @headlessui/react in #3801.

Verification

Fixes #3888

…lowed area

Port the fix from @headlessui-react PR tailwindlabs#3801 to @headlessui-vue.
The touchstart handler now uses d.group()/_d.dispose() to clear
previously applied touchAction styles before evaluating the new
touch, preventing the Dialog from becoming stuck unscrollable.

Fixes tailwindlabs#3888
@vercel

vercel Bot commented Aug 16, 2026

Copy link
Copy Markdown

@rescue-g is attempting to deploy a commit to the Tailwind Labs 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.

@headlessui/vue Dialog gets stuck unscrollable on iOS after touching outside it (same bug as #3234, fixed for React in #3801 but not ported)

2 participants