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.

Modal root element makes certain types of hover interaction impossible

See original GitHub issue

Because Modal creates a screen-filling element, it seems like it’s impossible to implement something like opening a submenu whenever a MenuItem is hovered. Either it’s impossible to tell if the MenuItem is still being hovered (because it’s blocked by the modal root), or the submenu can’t get any pointer events, if I disable pointer events on its modal root, so that I can see if a MenuItem is being hovered.

My last issue about this seems to have been deleted because I complained about how difficult this has been. It’s been very frustrating for me trying to fix this functionality in material-ui-popup-state to help one of the people using my library 😢 Can someone please show some sympathy for my frustration? We are humans, not robots. Only robots should be expected to show no emotion at all.

I had edited the issue to soften the language I wrote while angry. But I never called anyone names or used threatening language. I think you should allow me to say that I feel angry, and contend that something was a bad idea when I illustrate problems it’s causing.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
jedwards1211commented, Feb 15, 2019

Okay I discovered that even though pointer-events: none on the modal root element makes all of its descendants invisible to the mouse, I can set pointer-events: auto on the descendants to make them visible to the mouse again. So there is a solution to this problem, not that it’s elegant.

I still question the logic of rendering a Popover inside of an invisible screen-filling element that serves little purpose when the backdrop is hidden (which Popover does). But at least hover interaction isn’t impossible.

1reaction
mbrookescommented, Jan 30, 2019

Related issues: #8152 #11723

Read more comments on GitHub >

github_iconTop Results From Across the Web

Modal root element makes certain types of hover interaction ...
Because Modal creates a screen-filling element, it seems like it's impossible to implement something like opening a submenu whenever a ...
Read more >
Specificity - CSS: Cascading Style Sheets - MDN Web Docs
It enables making CSS selectors very specific in what element is targeted without any increase to specificity. In creating third-party CSS to be ......
Read more >
Tooltip | Components - BootstrapVue
Elements with the disabled attribute aren't interactive, meaning users cannot focus, hover, or click them to trigger a tooltip (or popover). As a...
Read more >
Make CSS Hover state remain after "unhovering"
The problem is that anything you change with the :hover pseudo-class selector will not (and/or should not) match elements over which you are...
Read more >
ion-popover - Ionic Framework
ion-popover is a dialog that appears on top of the current page. Learn about the popover UI component and CSS custom properties for...
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