question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(BUG) [React] Can't click on anything after closing Dialog component

See original GitHub issue

What package within Headless UI are you using? @headlessui/react

What version of that package are you using? v1.6.5, but this bug seems to be present since v1.6.3

What browser are you using? Firefox

Reproduction URL https://github.com/Blaumaus/headless-dialog-bug

Describe your issue When I open the Dialog and close it, I can’t click on anything as the component is still present in the DOM tree, but with an empty content. image

Also there is this warning in the console - There are no focusable elements inside the <FocusTrap />.

UI Demonstration: (same issue is present on the test repository I provided, the demos are used as a real-world example recorded before)

https://user-images.githubusercontent.com/35810911/177014258-f5a829e7-a866-4073-b4a9-055d5d5bfbba.mp4

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:7
  • Comments:5

github_iconTop GitHub Comments

1reaction
RobinMalfaitcommented, Sep 1, 2022

This should be fixed by #1803, and will be available in the next release.

You can already try it using npm install @headlessui/react@insiders.

0reactions
tianyingchuncommented, Jul 24, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

OnClick Listeners not working after closing full-screen dialog ...
It looks like the problem lies in your TransitionComponent , you're passing a new instance of it to your Dialog each time you...
Read more >
Dialog (Modal) - Headless UI
Clicking outside the Dialog.Panel component will close the dialog, so keep that in mind when deciding which styles to apply to which elements....
Read more >
FIX: Mouse Moves but Cannot Click (Solved) - wintips.org
The "Mouse Moves but Cannot Click" problem can appear suddenly, ... So, proceed and replace the mouse, but shutdown your PC first (press...
Read more >
Detect click outside React component - Material UI - MUI
The Click-Away Listener component detects when a click event happens outside of its child element.
Read more >
Error Handling in React 16 – React Blog
In the past, JavaScript errors inside components used to corrupt React's internal state and cause it to emit cryptic errors on next renders....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found