Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix stacking order of canvas #1397

Merged
merged 1 commit into from
Mar 28, 2023
Merged

Fix stacking order of canvas #1397

merged 1 commit into from
Mar 28, 2023

Conversation

axelboc
Copy link
Contributor

@axelboc axelboc commented Mar 28, 2023

Regression introduced in #1387 ... so much for bringing stacking under control 😓

The canvas was still stacked implicitly at z-index: 0, so in front of the grid and SVG elements... Sorry about that. So now it moves behind everything.

Unfortunately, in doing so, r3fRoot—which is still stacked implicitly at z-index: 0 (and cannot be stacked explicitly without creating a new stacking context and breaking the stacking order, as explained in a comment in the CSS)—captures events before the reach the canvas... I had to work around this by moving pointer-events: none to r3fRoot instead of setting it on every overlay, and then re-enabling it to auto on the canvas and floating toolbar.

This feels better in the end, since it removes a bunch of pointer-events: none and saves us and consumers from forgetting to add them.


Note that this may very well change when dealing with #1388. To be continued...

@axelboc axelboc requested a review from loichuder March 28, 2023 13:55
Copy link
Member

@loichuder loichuder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

packages/lib/src/vis/shared/VisCanvas.module.css Outdated Show resolved Hide resolved
@axelboc axelboc merged commit 067fcfb into main Mar 28, 2023
@axelboc axelboc deleted the fix-stacking branch March 28, 2023 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants