Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dialog): prevent unintended dialog closure on releasing pressing #7208

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

songkeys
Copy link

Problem

When users try to select text within a dialog, if they start the selection inside the dialog but move their cursor outside and release pressing, it would unexpectedly trigger the dialog to close. This creates a poor user experience, especially when users are trying to interact with text content (e.g. move to select something).

Solution

Implemented press state tracking to ensure the dialog only closes when both the press start AND end events occur inside the background area.

Reproduction

Screen.Recording.2024-12-20.at.17.43.40.mp4

This screen recording demostrating me trying to full-text select the gif alt text.

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