Bug Tracker

Opened 12 years ago

Closed 11 years ago

#10416 closed bug (fixed)

defaultDisplay returns block instead of table-row for a tr in FF

Reported by: kennyk@… Owned by:
Priority: low Milestone: 1.next
Component: effects Version: 1.6.4
Keywords: FF Cc:
Blocked by: Blocking:

Description

http://jsfiddle.net/mh8mF/

.toggle(true/false) on <tr/> may sometimes not behave properly on table with "colspan" See fiddle example, the row on "Bad|Table" get collapsed.

Using .hide()/.show() will also trigger the same problem

Change History (27)

comment:1 Changed 12 years ago by Timmy Willison

Component: unfiledeffects
Priority: undecidedlow
Resolution: invalid
Status: newclosed

Valid html needs to be appended to the table. See http://jsfiddle.net/timmywil/mh8mF/4/

comment:2 Changed 12 years ago by kennyk@…

The original post is appended to the table.

The two "tables", one is good (expected result) and one is bad (buggy). The different is due to the usage of toggle() function.

comment:3 Changed 12 years ago by Timmy Willison

Resolution: invalid
Status: closedreopened
Summary: toggle() may not work on table row <tr/> properlydefaultDisplay returns block instead of table-row for a tr in FF

Ok, I read that wrong. But it actually worked for me in Chrome and IE6. It seems this is only an issue in Firefox.

comment:4 Changed 12 years ago by Timmy Willison

Milestone: None1.next
Status: reopenedopen

comment:5 Changed 12 years ago by Rick Waldron

Owner: set to Rick Waldron
Status: openassigned

comment:6 Changed 12 years ago by Timmy Willison

I've only checked FF 7 so far: http://jsfiddle.net/timmywil/mh8mF/9/

comment:7 Changed 12 years ago by Timmy Willison

Milestone: 1.next1.7

comment:8 Changed 12 years ago by Rick Waldron

Resolution: fixed
Status: assignedclosed

Landing pull request 530. Fixes coniditional path for tr, td defaultDisplay() calls. Fixes #10416.

More Details:

comment:9 Changed 12 years ago by Timmy Willison

Revert "Landing pull request 530. Fixes coniditional path for tr, td defaultDisplay() calls. Fixes #10416." Fixes #10622.

This reverts commit 22f2e8b3dc18dede5f1ccb28cbdf8cb5bcde115f.

Changeset: 0752687612d190f608e64181148ced1a4adfa5d6

comment:10 Changed 12 years ago by Timmy Willison

Resolution: fixed
Status: closedreopened

comment:11 Changed 12 years ago by Timmy Willison

Milestone: 1.71.7.1
Owner: changed from Rick Waldron to Timmy Willison
Status: reopenedassigned

comment:12 Changed 12 years ago by Rick Waldron

#10741 is a duplicate of this ticket.

comment:13 Changed 12 years ago by davidtwtong@…

http://jsfiddle.net/davidtong/gxNeD/

Try it in Chrome/IE and then in FF. The red console div should be empty in Chrome/IE, but in FF it says 'block'

My workaround:

var old_display = j_div.css('display'); cache custom display value (e.g. display:table-cell)

j_div.detach().hide(); upon detach, j_div.css('display') returns 'block' even if we set display:table-cell in the CSS

$j._data(j_div[0], "olddisplay", old_display);

comment:14 Changed 12 years ago by Rick Waldron

Which version of FF are you testing in?

comment:15 Changed 12 years ago by Rick Waldron

To note, the original fix for this bug caused a regression and we plan on revisiting the issue during the 1.7 lifecycle.

comment:16 Changed 12 years ago by Rick Waldron

Milestone: 1.7.11.next

comment:17 Changed 12 years ago by davidalism

re: rwaldron

Tested on FF 3.6 and FF 7. They both report "block". Chrome and IE return "" (empty string).

comment:18 Changed 11 years ago by mikesherov

#10918 is a duplicate of this ticket.

comment:19 Changed 11 years ago by mikesherov

fully reduced test case: http://jsfiddle.net/73EZY/ confirmed still present in FF12

Last edited 11 years ago by mikesherov (previous) (diff)

comment:20 Changed 11 years ago by mikesherov

Keywords: FF added

comment:21 Changed 11 years ago by gibson042

Is this a job for wrapMap?

comment:22 Changed 11 years ago by mikesherov

This looks like a bug in FF itself. Gibson042, can you confirm?

comment:23 Changed 11 years ago by gibson042

If this is a bug, it's easy to work around. Check out what happens when you detach the entire table: http://jsfiddle.net/73EZY/1/

comment:24 in reply to:  23 Changed 11 years ago by anonymous

Replying to gibson042:

If this is a bug, it's easy to work around. Check out what happens when you detach the entire table: http://jsfiddle.net/73EZY/1/

This example doesn't seems related to the original bug. This is just an example of usage, which doesn't even hit the bug situation.

comment:25 Changed 11 years ago by gibson042

#12272 is a duplicate of this ticket.

comment:26 Changed 11 years ago by Timmy Willison

Owner: Timmy Willison deleted
Status: assignedopen

comment:27 Changed 11 years ago by Oleg

Resolution: fixed
Status: openclosed

Fix #10416. Don't trust computed styles on detached elements. Close gh-941.

Changeset: bea5ecbba72f22e8924186d9b81839122ec86aef

Note: See TracTickets for help on using tickets.