question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Flex layout issue in IE11 (includes fix suggestion)

See original GitHub issue

Do you want to request a feature or report a bug? Bug

What is the current behavior? Using flex layout (Bootstrap 4) inside Toastify__toast-body class has issues rendering in IE11, works fine in latest Chrome. Example is with one fixed column width (col-md-3) and second column dynamic (col): image

Proposed fix: As other users may encounter this while trying to support IE11, suggest adding width: 100%; style by default in https://github.com/fkhadra/react-toastify/blob/7ec50404e883ea88e9cab2019857ef96fb072776/scss/_toast.scss#L39-L42

I’m temporarily fixing this by applying the following in my CSS, please advise if this above recommendation is suitable, if so I can create a PR (or feel free to apply):

.Toastify__toast-body {
    width: 100%;
}

What is the expected behavior? image

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React? React 16.8.6, Windows, Internet Explorer 11

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
fkhadracommented, Apr 22, 2021

Ok, I remember why I did it… I forgot to revert this thing 🤣

1reaction
bmolnar2commented, Apr 19, 2021

@jkamleh, sorry, I did not link the change. It wasn’t #573 , but this: https://github.com/fkhadra/react-toastify/commit/468d54513148ba1bcad5124640f8b8080ce176aa Probably I thought this bug was reported as one caused by the latter.

For my case, the solution was to override the style in SCSS. Obviously not with the change you proposed, but whatever is necessary (e.g. adding back flex 1 1).

The point is that you can customize certain class styles of the lib, so unless that was a change concerning every user, it doesn’t make sense to revert any piece of change for my case. (Not like anyone was considering it. 😄)

Read more comments on GitHub >

github_iconTop Results From Across the Web

IE11 table layout breaks when ancestor has display: flex
But in IE11, the layout is broken when an ancestor element has display: flex . The input boxes at the bottom of the...
Read more >
Troubleshooting Flex-based layout issues for Internet Explorer 11 ...
Of note are the suggested approaches to troubleshooting and debugging flexbox layouts when Internet Explorer 11 is the target browser.
Read more >
Fixing Flexbox positioning for IE10 & IE11 - Netcetera Tech Blog
First you try to add the IE specific properties, like -ms-justify-content: flex-end; but it doesn't work.
Read more >
Internet Explorer Hacks. The bane of existence for every…
This problem happens because the flex items ignore their parent container's height if it's set via the min-height property. FIX. Luckily, there ...
Read more >
Handling common HTML and CSS problems - MDN Web Docs
This is a common problem, especially when you need to support old browsers (such as Internet Explorer) or you are using features that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found