Getting weird clipping on Backdrop when used with Docz
See original GitHub issue🐛 Bug report
Current behavior
The DialogBackdrop
appears to be having some strange issues with its position in the DOM.
Any Playground
after the modal that you trigger appears above/“to clip” the DialogBackdrop
.
The Playground
has these styles applied by Docz.
top: 0;
left: 0;
z-index: 0;
position: relative;
width: auto;
height: auto;
padding: 0px;
margin: 0 0 30px;
background: transparent;
box-sizing: border-box;
-webkit-transition: background 0.3s;
transition: background 0.3s;
The DialogBackdrop
has these styles applied by me:
background-color: rgba(0, 0, 0, 0.5);
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 9998;
transition: opacity 300ms;
opacity: 1;
&.hidden {
opacity: 0;
}
Expected behavior
I expect the DialogBackdrop
to be over all other elements in this page.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Getting weird clipping on Backdrop when used with Docz #404
Bug report Current behavior The DialogBackdrop appears to be having some strange issues with its position in the DOM.
Read more >How do I fix weird clipping glitch on my Object with Image ...
I am currently working in Blender in Eevee and getting a really weird glitch where I can see random faces of my object...
Read more >CSS background-size: cover + background-attachment: fixed ...
When each of the figures takes up the entire viewport, this works fine, but if there is an offset of any kind the...
Read more >Background2D — photutils 1.6.0 - Read the Docs
Class to estimate a 2D background and background RMS noise in an image. The background is estimated using (sigma-clipped) statistics in each box...
Read more >CanvasRenderingContext2D.clip() - Web APIs - MDN Web Docs
The even-odd winding rule. path. A Path2D path to use as the clipping region. Return value.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the reproduction! 😃
Looks like the
z-index
onPlayground
is creating a new composite layer for the backdrop. If you removez-index
from the playground, it works.The solution is indeed rendering
DialogBackdrop
in aPortal
. We can think of a way to do that automatically if the dialog is modal.@diegohaz I managed to get the issue reproduced inside a codesandbox.
Here is the link, let me know if you have any issues. https://codesandbox.io/s/github/stramel/reakit-issue-404/tree/master/