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

This fix should be reconsidered. #13

Open
bighoho123 opened this issue Oct 23, 2019 · 4 comments
Open

This fix should be reconsidered. #13

bighoho123 opened this issue Oct 23, 2019 · 4 comments

Comments

@bighoho123
Copy link

transform: translateZ(0); // Fix the border disappearing bug in Chrome

This fix is creating a local stacking context for each field based on their order in the DOM. And this will cause an issue in the following scenario:

.field-1
    .select
.field-2
    .textarea

Both .select and .textarea is using some custom components (not native formalism). They all have some kind of z-index defined in them.

If select list is too long, the z-index attribute of the list won't work due to the ancestor's(.field-set__inner) local stacking context and will always show behind the .textarea

I noticed that this transform was introduced to solve an browser issue, wonder if there is another solution?

2019-10-23 at 10 44 am

@bighoho123
Copy link
Author

The same style exists for .form__group

@ben-rogerson
Copy link
Member

Hey jinzhe, do you think a reasonable fix would be to z-index select elements above everything else?

@bighoho123
Copy link
Author

I think the best way is to remove the transform on .form__group and .field-set__inner so that there isn't any local stacking context established. And try to solve the original issue via another approach.

I've remove it in my fork but since you had a note there as "// Fix the border disappearing bug in Chrome" so thought i'd ask first before making a pull request. Do you remember how to recreate this bug in the comment?

@ben-rogerson
Copy link
Member

ben-rogerson commented Oct 29, 2019

I believe that bug can be recreated by resizing the browser window. When it hits certain widths a 1px border disappears.
There are two separate bug fixes right there.

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

No branches or pull requests

2 participants