fix: fixing invalid containing block calculation on IE for fixed strategy - #1268
Conversation
Change Log for @popperjs/core (2.9.1 → 2.9.2)Bug Fixes
|
| // return the containing block | ||
| function getContainingBlock(element: Element) { | ||
| const isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1; | ||
| const isIE11 = navigator.userAgent.indexOf('Trident') !== -1; |
There was a problem hiding this comment.
Isn't this more like a generic isIE?
There was a problem hiding this comment.
Trident applies only for IE11, if we want to check older IE versions we need to have more if’s, do we need this?
There was a problem hiding this comment.
No, I thought Trident was in all IE versions, thanks for the info.
There was a problem hiding this comment.
So we could resolve this?
There was a problem hiding this comment.
I checked again - you were right, Trident is more generic like isIE, it applies for IE 9, 10 and 11
There was a problem hiding this comment.
According to this i pushed a change
There was a problem hiding this comment.
I guess @FezVrasta is right about Trident and it can be isIE variable. I don't have old IE to test this but found something like this: https://stackoverflow.com/a/27069089
|
@FezVrasta are there any chances to get this checked and confirmed soon to be released as soon as possible? |
According to CSS 2.1 (https://www.w3.org/TR/CSS21/visudet.html#containing-block-details) which is used by Internet Explorer for containing block calculation (https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa768717(v=vs.85)) i prepared a fix which is obtaining correct containing block (same as IE will use for displaying content on page).
This fix will ensure that we use correct containing blocks for IE 9, 10 and 11.
I cannot paste codepen, cause it has some errors on IE.
However You can check new behavior using code below. I also added core-js to polyfill ES6 functions