#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: |
Description
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 7 years ago by
| Component: | unfiled → effects |
|---|---|
| Milestone: | 1.5 → 1.4.4 |
| Owner: | set to snover |
| Priority: | undecided → blocker |
| Status: | new → assigned |
| Version: | 1.4.3 → 1.4.4rc |
comment:2 Changed 7 years ago by
| Owner: | snover deleted |
|---|---|
| Status: | assigned → open |
comment:3 Changed 7 years ago by
If I'm reading the spec right, it seems that jquery is doing the right thing 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?
comment:4 Changed 7 years ago by
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 7 years ago by
| Owner: | set to john |
|---|---|
| Status: | open → assigned |
comment:6 Changed 7 years ago by
comment:7 Changed 7 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Fixes #7397; Adds 4 supporting unit tests.
Changeset: 795e880bba1f7f949df58748f7fd92e50296a8f4
comment:8 Changed 7 years ago by
| Cc: | john added |
|---|
Updated Unit tests (with original patch)
https://github.com/jquery/jquery/pull/94
( Unit tests are passing in IE 6,7,8 )
comment:9 Changed 7 years ago by
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
comment:10 Changed 7 years ago by
| Priority: | blocker → low |
|---|---|
| Resolution: | → wontfix |
| Status: | reopened → closed |
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 7 years ago by
| Milestone: | 1.4.4 → 1.4.5 |
|---|---|
| Resolution: | wontfix |
| Status: | closed → reopened |
| Version: | 1.4.4rc → 1.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 7 years ago by
| Status: | reopened → assigned |
|---|
comment:14 Changed 7 years ago by
| Owner: | changed from john to Rick Waldron |
|---|
comment:16 Changed 7 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Fixes #7397.
Changeset: 2defa4863a114358e03dbae1b10521555fd9cd9c
comment:18 Changed 7 years ago by
| Milestone: | 1.4.5 → 1.5 |
|---|
Move fixed tickets to appropriate milestone

I’m punting on this one.
jQuery.cssretrieves the computed style of any given element. In this case the computed style isblockas 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 beinlineorblock. Needs more spec research.