Side navigation
#8099 closed bug (fixed)
Opened January 31, 2011 05:44PM UTC
Closed April 14, 2011 07:58PM UTC
Last modified March 19, 2012 09:24PM UTC
SPAN element becomes block level on show()
Reported by: | sime.vidas@gmail.com | Owned by: | rwaldron |
---|---|---|---|
Priority: | blocker | Milestone: | 1.6 |
Component: | effects | Version: | 1.5 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I created two demos:
Demo 1: http://jsfiddle.net/DqvTa/7/
Demo 2: http://jsfiddle.net/DqvTa/8/
The demos are almost identical. The only difference is that I set #span { display:none; } in demo 1 and span { display:none; } in demo 2.
Could someone explain why the SPAN element - in demo 2 - becomes a block-level element?
My assumption is that (during show()) jQuery internally creates a SPAN element to check whether it is naturally an inline or block-level element. But since I set all SPANs to display:none in demo 2, jQuery is unable to determine that.
Attachments (0)
Change History (16)
Changed January 31, 2011 05:55PM UTC by comment:1
_comment0: | Confirmed: \ \ http://jsfiddle.net/rwaldron/DqvTa/13/ → 1296496889118175 |
---|---|
component: | unfiled → effects |
milestone: | 1.next → 1.5.1 |
priority: | undecided → blocker |
status: | new → open |
Changed January 31, 2011 06:03PM UTC by comment:2
The exact function where the undesired behaviour happens seems to be defaultDisplay where it adds the element to the page and checks for its display property and if it is none or "" then it assumes block.
Changed January 31, 2011 06:06PM UTC by comment:3
Apologies for my comment. It was relevant when I typed it but not by the time I submitted it. I would delete if I could but I don't seem to have the option. Please delete it (and this one with it).
Changed January 31, 2011 07:33PM UTC by comment:4
owner: | → rwaldron |
---|---|
status: | open → assigned |
Changed January 31, 2011 07:53PM UTC by comment:5
Changed February 08, 2011 05:58PM UTC by comment:7
version: | 1.4.4 → 1.5 |
---|
Changed February 14, 2011 05:37PM UTC by comment:8
resolution: | → fixed |
---|---|
status: | assigned → closed |
Landed.
Changed February 15, 2011 08:24PM UTC by comment:9
_comment0: | There you go. Proof of FOUC \ \ http://www.vidup.de/v/uDVov/ → 1297801694155676 |
---|
There you go. Proof of FOUC happens at least in Opera 10.63/11/11.01 on Windows XP. And a (maybe) subjective feeling that the first few effects test take way longer with the 8099 fix then without
Changed February 15, 2011 09:34PM UTC by comment:10
milestone: | 1.5.1 → 1.6 |
---|---|
resolution: | fixed |
status: | closed → reopened |
Reverted commit faa6fe32f72900d7b31000caead2794a8346f6d8
Caused FOUC in Opera verified by me, mike and dave.
Changed February 15, 2011 10:37PM UTC by comment:11
</3
Changed February 19, 2011 06:33PM UTC by comment:12
status: | reopened → open |
---|
Changed March 06, 2011 11:53PM UTC by comment:13
#8414 is a duplicate of this ticket.
Changed April 12, 2011 05:29PM UTC by comment:14
status: | open → assigned |
---|
Tested and passing in IE6, 7, 8; Chrome 9, 10, 12; Safari 3, 4, 5; Firefox 3.0.12, 3.6.16, 4: http://jsfiddle.net/rwaldron/6THBr/show/
Combined effort by louisremi (lrbabe) and myself. Patch & PR to follow
Changed April 12, 2011 05:36PM UTC by comment:15
Here is my PR, for the record: https://github.com/jquery/jquery/pull/320
Changed April 14, 2011 07:58PM UTC by comment:16
resolution: | → fixed |
---|---|
status: | assigned → closed |
Merge branch '8099' of https://github.com/rwldrn/jquery. Fixes #8099.
Conflicts:
test/data/testsuite.css
Changeset: 1dda994c463f01977c7126407998d61efed218a5
Confirmed:
http://jsfiddle.net/rwaldron/DqvTa/13/
However, it appears that by setting the display to "none" for all span tags, you've short-circuited the internal defaultDisplay function:
http://jsfiddle.net/rwaldron/DqvTa/15/