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

[bug]: Text selection handles on iOS are not responsive for Input components in Dialog #5919

Open
2 tasks done
olsavmic opened this issue Nov 23, 2024 · 5 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@olsavmic
Copy link

Describe the bug

When Text Input is used in modal Dialog, it is impossible to drag the text selection handles (left & right side, to extend / shorten the selection) on iOS.

The bug can be tested on the examples on https://ui.shadcn.com/docs/components/dialog - the "Custom close button" example contains a Share Link input where it's possible to select text by double tapping the word, but the selection cannot be customised by dragging.

I guess it has something to do with the pointer-events that dialog manipulates with, z-index of the overlay and fixed dialog positioning, but I'm unfortunately not skilled enough FE dev to find out.

Affected component/components

Dialog

How to reproduce

  1. Go to https://ui.shadcn.com/docs/components/dialog
  2. Open the "Custom close button" example
  3. Select text by double tapping the word,
  4. Try to change selection range by dragging the handles -the selection is irresponsive

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

iOS 18.1

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues
@olsavmic olsavmic added the bug Something isn't working label Nov 23, 2024
@stas-kh
Copy link

stas-kh commented Dec 23, 2024

Facing the same issue, could you guys take a look at it, please?

@wolf-joe
Copy link

Same issue, suffering.

@ishan0102
Copy link

Same issue

@f3ndot
Copy link

f3ndot commented Jan 21, 2025

I found that if I stopped using the <Dialog.Overlay /> component within the annatomy, 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

Someone also reported this bug in the actual primitives library repo: radix-ui/primitives#3331 and radix-ui/primitives#2492

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants