ericclemmons / click-to-component

Option+Click React components in your browser to instantly open the source in VS Code
MIT License
1.94k stars 75 forks source link

Set `z-index` of FloatingOverlay contextmenu to maximum possible #24

Closed atomiks closed 2 years ago

atomiks commented 2 years ago

Cool lib, discovered it's using Floating UI 😄

Describe the bug Right now if the webpage has positioned elements, the context menu can be obscured beneath them.

Screen Shot 2022-04-27 at 8 58 39 am

It may be a good idea to set the z-index of the FloatingOverlay to 2147483647 to ensure it's always above everything else. (In fact, FloatingOverlay maybe should do that by default?)

To Reproduce Right click

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

ericclemmons commented 2 years ago

I'm having a time trying to get it to "win" with z-index on https://floating-ui.com/:

Screen Shot 2022-04-27 at 9 35 31 AM

I intentionally don't bundle this library so people can modify node_modules/click-to-react-component/**/*.js directly and run patch-package for a diff.

I'll have to play with this some more...

Ferezoz commented 2 years ago

Cool library @ericclemmons! I am giving a +1 for this as I am getting the context menu below modals or any element which has a z-index more than 0

ericclemmons commented 2 years ago

Fixed via #36 !