Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#10915 closed bug (invalid)

jQuery 1.6 and after, incorrect feature detection for IE8

Reported by: signor.verni@… Owned by:
Priority: low Milestone: None
Component: support Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:

Description

In jQuery 1.6 and after (tested in 1.6, 1.6.4, 1.7, 1.7.1) feature detection: $.support.style returns false.

Versions before 1.6 (tested in 1.5.2) returned true.

Bug is still present in latest 1.7.1 release.

Change History (3)

comment:1 Changed 8 years ago by sindresorhus

Component: unfiledsupport
Priority: undecidedlow
Resolution: invalid
Status: newclosed

This is not a bug, the bug was actually in 1.5.2.

From the docs:

style is equal to true if inline styles for an element can be accessed through the DOM attribute called style, as required by the DOM Level 2 specification. In this case, .getAttribute('style') can retrieve this value; in Internet Explorer, .cssText is used for this purpose. DOM l2 Style spec

Since IE is using .cssText, it does not support the style attribute, and therefor returns false.

comment:2 Changed 8 years ago by timmywil

This was an intentional change. IE8 is buggy in a different way than IE6/7. IE6/7 will return the style property rather than the attribute and IE8 will return the attribute, but with all style properties uppercased. We normalize this.

comment:3 Changed 8 years ago by anonymous

OK, thanks

Note: See TracTickets for help on using tickets.