Skip to content

use native getComputedStyle on IE9 and IE10#2419

Closed
gonchuki wants to merge 1 commit intomootools:masterfrom
gonchuki:refactor_getComputedStyle
Closed

use native getComputedStyle on IE9 and IE10#2419
gonchuki wants to merge 1 commit intomootools:masterfrom
gonchuki:refactor_getComputedStyle

Conversation

@gonchuki
Copy link
Member

this is a robustness enhancement as discussed on #2414 (comment)

This relegates the use of non-standard currentStyle to oldIE and Opera (which has a bug where sub-pixel values get rounded on native getComputedStyle, which can create jerky animations)

As you see this also finally kills the usage of browser.* sniffs on getStyle

Copy link
Member Author

Choose a reason for hiding this comment

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

appending this here as the body might not exist yet at this point of the code execution (if js was included in head) and Opera returns empty values for window.getComputedStyle on a detached node.

@arian
Copy link
Member

arian commented Sep 5, 2012

Looks good.

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.

2 participants