Skip to content

Resize listening iframes dynamic z-index seems incoherent #5241

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

Closed
crotru opened this issue Aug 5, 2020 · 2 comments
Closed

Resize listening iframes dynamic z-index seems incoherent #5241

crotru opened this issue Aug 5, 2020 · 2 comments
Labels
awaiting submitter needs a reproduction, or clarification

Comments

@crotru
Copy link

crotru commented Aug 5, 2020

Describe the bug
In order to calculate dynamic resize, Svelte uses an iframe and adds inline style properties on it.
Among those, a calculated z-index, that gets the iframe on top of every other items inside the binded dom element.


if binded element has a computed z-index, iframe will be set to that z-index - 1
(I'm not sure why is that - I am probably missing something ^^)

This seems weird to have a correlation between parent and children z-indexes.
In the end we have something like this :

holder : z-index: 3
|- element : z-index: auto
|- element : z-index: auto
|- iframe : z-index: 2

No matter what z-index is on the holder, a positive z-index on the iframe will always be above auto ones

Note that among those added inline styles, there is also a pointer-events set to none, which prevent problems when iframe comes on top, but it seems ios12 and below doesn't support pointer-events on iframes.

Logs
Happens everywhere but really is problematic on chrome/safari ios12

To Reproduce
Visible on this repl :
https://svelte.dev/repl/7e5a4ca7dccc498fa067300d7ed9fff0?version=3.24.0

Expected behavior
Iframe not above anything.
Maybe a fix z-index: -1 would do it - that's how it was fixed on the project I'm working on

Information about your Svelte project:

  • Svelte version 3.24.0 / Webpacked

Severity
Blocking ios12 and below users (3 to 5% here)

@antony
Copy link
Member

antony commented Dec 4, 2020

Can we verify if this is the same issue as #5448 ?

@crotru
Copy link
Author

crotru commented Dec 4, 2020

It is. I close this one.

@crotru crotru closed this as completed Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting submitter needs a reproduction, or clarification
Projects
None yet
Development

No branches or pull requests

2 participants