Skip to content

Events on mobile propagating through Dialog overlay (as suggested from docs) #2884

Closed
@jrubins

Description

@jrubins

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

v1.7.17

What browser are you using?

Chrome, Chrome on Android

Reproduction URL

"Working" version on v1.7.15: https://codesandbox.io/p/devbox/headlessui-react-1-7-15-rc59pw
"Broken" version on v1.7.16: https://codesandbox.io/p/devbox/headlessui-react-1-7-16-674pqg

Describe your issue

Steps to Reproduce

  1. In CodeSandbox, click the button at the top-right of the preview to open in a new tab.
  2. Open Chrome DevTools and toggle on the device mode.
  3. With theDialog open (which it is by default in the reproduction URL), click the "Click Me Behind Dialog" text.

Expected Results
The Dialog is closed and no paragraph indicating the button was also clicked is shown.

Actual Results
The Dialog is closed and the paragraph indicating the button was also clicked is shown.

Notes

  • This is a minimal example with a Dialog copy-pasted from the docs on using a backdrop (https://headlessui.com/react/dialog#adding-a-backdrop).
  • The "broken" behavior does not happen on desktop.
  • The "broken" behavior happens on an actual device (so this doesn't seem like a Chrome emulator issue). I tested by sending the web page from CodeSandbox to my Android phone in Chrome and testing there as well.
  • The "broken" behavior does not happen on version 1.7.15 of the library.
    • This commit seems potentially relevant between the two tags: a9e8563?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions