Skip to content

v4: Add z-index to .custom-check to fix custom checks in CSS columns#30810

Merged
XhmikosR merged 3 commits intov4-devfrom
v4-custom-check-zindex
Jun 4, 2020
Merged

v4: Add z-index to .custom-check to fix custom checks in CSS columns#30810
XhmikosR merged 3 commits intov4-devfrom
v4-custom-check-zindex

Conversation

@mdo
Copy link
Copy Markdown
Member

@mdo mdo commented May 13, 2020

For some reason, custom checks in CSS columns need a new stacking order to maintain visibility. This PR adds z-index: 1 to trigger that new stacking order. Since v5's forms are being redone entirely, and we're dropping IE10/11 there, I think this is totally fine to ship with v4 only. Will need to check v5's forms it in Edge though.

Fixes #29607.

For some reason, custom checks in CSS columns need a new stacking order to maintain visibility. This PR adds `z-index: 1` to trigger that new stacking order. Since v5's forms are being redone entirely, and we're dropping IE10/11 there, I think this is totally fine to ship with v4 only. Will need to check v5's forms it in Edge though.

Fixes #29607.
@mdo mdo requested a review from a team as a code owner May 13, 2020 23:36
@ffoodd
Copy link
Copy Markdown
Contributor

ffoodd commented May 14, 2020

FYI CSS columns trigger a new containing block, just as transform and perspective.

I mentionned the spec in another issue this week with transform: scale(1); as a workaround.

Don't know if it needs to be mentionned in the docs, but at least in the PR 😉

@XhmikosR
Copy link
Copy Markdown
Member

XhmikosR commented Jun 2, 2020

@MartijnCuppens LGTY, too?

@dmudro
Copy link
Copy Markdown

dmudro commented Nov 2, 2020

@mdo in my app, adding z:index: 1 to custom control caused a visual bug. imagine a complex form with a dropdown already using z:index: 1 for its overlay in expanded state (menu); since this the custom control comes after the dropdown in the form, it overlays the expanded menu.

so I traced the source of the issue and found this changed shipped in v4.5.1.

bumping up the z-index on the other component was an obvious fix in my case but touching z-index is always tricky. I wonder how many affected apps are out there and I if there was an alternative solution for solving the original bug #29607.

@davidscotson
Copy link
Copy Markdown

Like the user above, this triggered a couple of visual bugs for us where custom controls were show up through dropdowns.

Since the original bug seems to be IE11 and old Edge specific, perhaps targetting the fix to only those browsers would be a worthwhile compromise? That's what we intend to do locally anyway.

@XhmikosR
Copy link
Copy Markdown
Member

XhmikosR commented Feb 4, 2022

Please make a new issue if you think this still applies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants