Skip to content

Fix IE11 layout problem caused by flex-basis: auto - #2763

Closed
phacks wants to merge 1 commit into
marmelab:masterfrom
phacks:fix-ie11-layout-problems
Closed

phacks wants to merge 1 commit into
marmelab:masterfrom
phacks:fix-ie11-layout-problems

Conversation

@phacks

@phacks phacks commented Jan 12, 2019 •

Copy link
Copy Markdown
Contributor

As mentioned in #2676, IE11 suffers from several layout problems where the user would have to horizontally scroll to see all content and/or images would get absurdly distorted.

philipwalton/flexbugs#170 seems to show that IE11 shows inconsistency when using flex-basis: auto (or the shorthand version: flex: X Y auto).

I tried changing auto by 0px in such statements, and it looks like it fixed many of those layout problems in the demo app:

🙁Before (IE11) 🙂After (IE11)
image image
image image
image image

I also had to remove the display: flex and flex-wrap: wrap on SegmentsField because IE11 has many problems with flex-wrap: wrap. The wrapping still works (Chrome + IE11) though.

Navigating the demo app on Chrome showed me no visual regression, and <Aside /> components (for which the flex-basis: auto were introduced) still work as expected:

image
image

@phacks
phacks force-pushed the fix-ie11-layout-problems branch from beab316 to 380b671 Compare January 13, 2019 17:03

@Kmaschta Kmaschta left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you!

@Kmaschta Kmaschta added this to the 2.6.2 milestone Jan 14, 2019
@fzaninotto

Copy link
Copy Markdown
Member

This needs thorough testing across multiple browsers

@phacks

phacks commented Jan 14, 2019

Copy link
Copy Markdown
Contributor Author

@fzaninotto of course — how would you like me to proceed?

@fzaninotto

Copy link
Copy Markdown
Member

We use tools like BrowserStack. But I'll do the tests on this one to make sure it breaks nothing - we've had regressions in the past due to small changes in the layout CSS.

@fzaninotto fzaninotto removed this from the 2.6.2 milestone Jan 21, 2019
@phacks

phacks commented Jan 29, 2019

Copy link
Copy Markdown
Contributor Author

@fzaninotto Hi! Did you have time to run some browser testing on this issue?

Let me know if I can be of any help 🙂

@phacks

phacks commented Feb 12, 2019

Copy link
Copy Markdown
Contributor Author

@fzaninotto Hi! Do you think you will have some time to test this PR soon? cc @Kmaschta

Thanks!

@Kmaschta Kmaschta self-assigned this Feb 12, 2019
@Kmaschta

Kmaschta commented Feb 12, 2019 •

Copy link
Copy Markdown
Contributor

I booked 15min tomorrow to test that branch locally with Browserstack

@Kmaschta

Copy link
Copy Markdown
Contributor

I tested these layouts on several browsers (latest version), it is OK for me 👍

Here are the screenshots for each of them:

Google Chrome (Windows)

image

image

image

Internet Explorer 11 (Windows)

image

image

image

Mozilla Firefox (Windows)

image

image

image

Safari 12 (MacOS)

image

image

image

Edge (Windows)

image

image

image

Opera (Windows)

image

image

image

@Kmaschta Kmaschta removed their assignment Feb 13, 2019
@phacks

phacks commented Feb 13, 2019 •

Copy link
Copy Markdown
Contributor Author

@Kmaschta thanks for the review! @fzaninotto Do you think this PR can make it for the 2.7.2 / 2.8.0 milestones?

@djhi djhi added this to the 2.7.2 milestone Feb 13, 2019
@fzaninotto

Copy link
Copy Markdown
Member

Not good: I see an additional scrollbar at the bottom of the Comment List in the simple demo (Chrome, Ubuntu):

image

and at the bottom of the Posters list in the demo (Safari, macOS)

image

and on Windows as well:

image

So I can't merge this PR as is.

@phacks

phacks commented Feb 13, 2019

Copy link
Copy Markdown
Contributor Author

@fzaninotto Oops, I can work on it next week, will keep you updated!

@phacks

phacks commented Mar 6, 2019

Copy link
Copy Markdown
Contributor Author

@batbyR found another, cleaner solution that get rid of the superfluous scrollbars at the bottom! You may have a look over at #2969

@fzaninotto fzaninotto closed this Mar 7, 2019
@phacks
phacks deleted the fix-ie11-layout-problems branch March 7, 2019 09:49
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.

4 participants