Bug Tracker

Opened 10 years ago

Closed 9 years ago

Last modified 8 years ago

#6271 closed bug (duplicate)

jQuery.style() can set invalid filter styles under IE

Reported by: vortfu Owned by:
Priority: undecided Milestone:
Component: core Version: 1.4.2
Keywords: Cc:
Blocked by: Blocking:

Description

If an invalid opacity value is passed to jQuery.style it will still cause an inline filter style attribute to be set under IE - breaking any existing filter styles.

This bug came about during testing of some code which uses fadeIn() on an element which already has an opacity/filter style applied.

Please see the attached test HTML for an example.

In non IE browsers, the blue div is faded in on top of the red div from 0% to 50% opacity (purple's a fruit).

In IE the div fades in from 0% to 50% and then an empty filter style ("filter: ;") is applied and IE bumps the opacity all the way up to 100% (blue IS NOT a fruit)

Whether or not this is a problem with style() or with fadeIn() is up to you, but a quick patch (attached) to style() seemed to fix the problem for me.

Attachments (2)

jquery-test.html (984 bytes) - added by vortfu 10 years ago.
Test HTML
jquery-patch.txt (950 bytes) - added by vortfu 10 years ago.
Patch

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by vortfu

Attachment: jquery-test.html added

Test HTML

Changed 10 years ago by vortfu

Attachment: jquery-patch.txt added

Patch

comment:1 in reply to:  description Changed 10 years ago by vortfu

s/Component: core/Component: css/

comment:2 Changed 9 years ago by snover

Milestone: 1.4.3

Resetting milestone to future.

comment:3 Changed 9 years ago by snover

Priority: undecided
Resolution: duplicate
Status: newclosed

comment:4 Changed 9 years ago by snover

Duplicate of #6841.

Note: See TracTickets for help on using tickets.