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

Unable to drag selection of input within Dialog component #3331

Open
LordZardeck opened this issue Jan 20, 2025 · 3 comments
Open

Unable to drag selection of input within Dialog component #3331

LordZardeck opened this issue Jan 20, 2025 · 3 comments

Comments

@LordZardeck
Copy link

Bug report

Current Behavior

If you have an input, textarea, or contenteditable within a dialog, and you attempt to select some text, and modify that selection range on iOS, it is extremely difficult if not impossible to do so.

Expected behavior

Dragging the selection on iOS should work as smoothly as it does on inputs not inside a dialog.

Reproducible example

You can see this happening on the radix website itself. Just open the "Edit Profile" dialog on iOS and attempt to modify the selection.
https://www.radix-ui.com/primitives/docs/components/dialog

Additional context

I discovered this when using vaul, but found out it's an issue in radix which powers vaul. I also noticed the issue is not prevalent on some other dialog components such as from Material UI: https://mui.com/material-ui/react-dialog/#form-dialogs

Your environment

Software Name(s) Version
Operating System iOS 18.1, 18.2, 18.3
@f3ndot
Copy link

f3ndot commented Jan 21, 2025

I found that if I stopped using the <Dialog.Overlay /> component within the anatomy, selection handles started working again! Furthermore: If I replaced that component with a simple <div> with the className styling that I want, I am able to get around this issue.

@f3ndot
Copy link

f3ndot commented Jan 21, 2025

Digging deeper, if I remove the <RemoveScroll /> from the overlay implementation the text selection handles will continue to work. I am unsure if that means the usage of this react-remove-scroll library component is bugged, or the root cause is within that particular library instead.

@f3ndot
Copy link

f3ndot commented Jan 21, 2025

Sameish report from Oct 2023: #2492

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

No branches or pull requests

2 participants