-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix: fixing invalid containing block calculation on IE for fixed strategy #1268
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
Conversation
Change Log for @popperjs/core (2.9.1 → 2.9.2)Bug Fixes
|
src/dom-utils/getOffsetParent.js
Outdated
@@ -22,6 +22,16 @@ function getTrueOffsetParent(element: Element): ?Element { | |||
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this more like a generic isIE
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I thought Trident was in all IE versions, thanks for the info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we could resolve this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to this i pushed a change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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