fix(@headlessui-vue): ensure Dialog on iOS works after touching disallowed area - #3889
Open
waterWang wants to merge 1 commit into
Open
fix(@headlessui-vue): ensure Dialog on iOS works after touching disallowed area#3889waterWang wants to merge 1 commit into
waterWang wants to merge 1 commit into
Conversation
…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
|
@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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR ports the iOS touch locking fix from @headlessui/react (PR #3801) to @headlessui/vue.
Problem
The
touchstarthandler inhandle-ios-locking.tsappliestouchAction: noneto 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
touchstarthandler ind.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
disposables().group()method is already available in the Vue package'sdisposables.tswith the same API as React'sFixes #3888