Skip to main content

Bug Tracker

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: Owned by: rwaldron
Priority: blocker Milestone: 1.6
Component: effects Version: 1.5
Keywords: Cc:
Blocked by: Blocking:

I created two demos:

Demo 1:

Demo 2:

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 rwaldron comment:1

_comment0: Confirmed: \ \
component: unfiledeffects
milestone: 1.next1.5.1
priority: undecidedblocker
status: newopen


However, it appears that by setting the display to "none" for all span tags, you've short-circuited the internal defaultDisplay function:

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 anonymous 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 rwaldron comment:4

owner: → rwaldron
status: openassigned

Changed January 31, 2011 07:53PM UTC by rwaldron comment:5

Changed February 08, 2011 05:58PM UTC by jitter comment:6

#8213 is a duplicate of this ticket.

Changed February 08, 2011 05:58PM UTC by jitter comment:7


Changed February 14, 2011 05:37PM UTC by john comment:8

resolution: → fixed
status: assignedclosed


Changed February 15, 2011 08:24PM UTC by jitter comment:9

_comment0: There you go. Proof of FOUC \ \

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 jitter comment:10

resolution: fixed
status: closedreopened

Reverted commit faa6fe32f72900d7b31000caead2794a8346f6d8

Caused FOUC in Opera verified by me, mike and dave.

Changed February 15, 2011 10:37PM UTC by rwaldron comment:11


Changed February 19, 2011 06:33PM UTC by snover comment:12

status: reopenedopen

Changed March 06, 2011 11:53PM UTC by rwaldron comment:13

#8414 is a duplicate of this ticket.

Changed April 12, 2011 05:29PM UTC by rwaldron comment:14

status: openassigned

Tested and passing in IE6, 7, 8; Chrome 9, 10, 12; Safari 3, 4, 5; Firefox 3.0.12, 3.6.16, 4:

Combined effort by louisremi (lrbabe) and myself. Patch & PR to follow

Changed April 12, 2011 05:36PM UTC by lrbabe comment:15

Here is my PR, for the record:

Changed April 14, 2011 07:58PM UTC by jeresig comment:16

resolution: → fixed
status: assignedclosed

Merge branch '8099' of Fixes #8099.



Changeset: 1dda994c463f01977c7126407998d61efed218a5