Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#7397 closed bug (fixed)

Regression: fadeIn no longer works correctly for inline elements

Reported by: dmuir Owned by: Rick Waldron
Priority: low Milestone: 1.5
Component: effects Version: 1.4.3
Keywords: Cc: john
Blocked by: Blocking:


I just upgraded from 1.4.2 to 1.4.3, and it looks like a bug similar to #4173 is back.

Example: http://jsfiddle.net/Gad7W/22/

When the span is absolutely positioned, the first time you click, it works correctly, but the second time you click, the span has display: block; If you have FireQuery installed in Firefox, you can see the olddisplay value swap from inline to block when the animation completes.

Change History (18)

comment:1 Changed 12 years ago by snover

Component: unfiledeffects
Owner: set to snover
Priority: undecidedblocker
Status: newassigned

comment:2 Changed 12 years ago by snover

Owner: snover deleted
Status: assignedopen

I’m punting on this one.

jQuery.css retrieves the computed style of any given element. In this case the computed style is block as per CSS 2.1 §9.7. Unfortunately it seems using this as the display value changes the way in which the element ends up rendering itself, even though the computed value is the same no matter whether it is specified to be inline or block. Needs more spec research.

comment:3 Changed 12 years ago by dmuir

If I'm reading the spec right, it seems that jquery is doing the right and that:

element {position: absolute;}

should be interpreted as:

element {display: block; position: absolute;}

I guess the problem stems from browsers not following the spec correctly?

Version 0, edited 12 years ago by dmuir (next)

comment:4 Changed 12 years ago by jitter

I suspect this may have something to do with this commit #5646a4.

Probably the value of olddisplay, if already set, shouldn't be always ignored as oldisplay does hold inline but gets overwritten with jQuery.css( this[i], "display" ) which is block at that moment.

comment:5 Changed 12 years ago by john

Owner: set to john
Status: openassigned

comment:7 Changed 12 years ago by rwldrn

Resolution: fixed
Status: assignedclosed

Fixes #7397; Adds 4 supporting unit tests.

Changeset: 795e880bba1f7f949df58748f7fd92e50296a8f4

comment:8 Changed 12 years ago by Rick Waldron

Cc: john added

Updated Unit tests (with original patch)


( Unit tests are passing in IE 6,7,8 )

comment:9 Changed 12 years ago by john

Resolution: fixed
Status: closedreopened

comment:10 Changed 12 years ago by john

Priority: blockerlow
Resolution: wontfix
Status: reopenedclosed

This commit was backed out last night, here: http://bit.ly/cJZckd It's not working correctly across all platforms.

In thinking about this more - this is really something that we're unlikely to fix. If you have an element that is being absolutely positioned it must be display: block (according to the CSS specification). Attempting to make it 'inline'. The fact that you're setting 'inline' (and use to get that value back) was purely incidental (and likely a bug on our end). The change in your code is as simple as making sure that your absolutely positioned elements have a display of 'block' set to them, consistently (this will help your display across browsers, as well).

comment:11 Changed 12 years ago by john

Resolution: wontfix
Status: closedreopened
Version: 1.4.4rc1.4.3

Rick got his patch working - we're going to try this for 1.4.5. Considering that this is handling a weird spec edge case I wouldn't consider this to be a blocker for 1.4.4.

comment:12 Changed 12 years ago by john

Status: reopenedassigned

comment:13 Changed 12 years ago by snover

#7563 is a duplicate of this ticket.

comment:14 Changed 12 years ago by snover

Owner: changed from john to Rick Waldron

comment:16 Changed 12 years ago by Colin Snover

Resolution: fixed
Status: assignedclosed

comment:17 Changed 12 years ago by Rick Waldron

#7886 is a duplicate of this ticket.

comment:18 Changed 12 years ago by jitter


Move fixed tickets to appropriate milestone

Note: See TracTickets for help on using tickets.