headlessui icon indicating copy to clipboard operation
headlessui copied to clipboard

Scrolling with long content doesn't not work on iOS after outside click

Open CSalih opened this issue 1 year ago • 0 comments

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

v2.0.3

What browser are you using?

Safari on iPad

Reproduction URL

URL: https://codesandbox.io/p/devbox/jolly-flower-8z97dd

Describe your issue

Scrolling with long content does not work on iOS after an outside click. This issue occurs only on iOS (reproduced on iPad), and specifically when an outside click does not close the dialog, such as when using <Dialog onClose={() => {}}>.

The problem is caused by touchAction: none being set after an outside click. Reviewing the code at handleIOSLocking L86, it seems the issue arises because it incorrectly assumes the dialog should close at that point.

CSalih avatar May 23 '24 12:05 CSalih