Ticket #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: | |
| Blocking: | Blocked by: |
Description
.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
comment:1 Changed 21 months ago by timmywil
- Priority changed from undecided to low
- Resolution set to invalid
- Status changed from new to closed
- Component changed from unfiled to effects
comment:2 Changed 21 months 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 21 months ago by timmywil
- Status changed from closed to reopened
- Resolution invalid deleted
- Summary changed from toggle() may not work on table row <tr/> properly to defaultDisplay 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 21 months ago by timmywil
- Status changed from reopened to open
- Milestone changed from None to 1.next
comment:5 Changed 21 months ago by rwaldron
- Owner set to rwaldron
- Status changed from open to assigned
comment:6 Changed 21 months ago by timmywil
I've only checked FF 7 so far: http://jsfiddle.net/timmywil/mh8mF/9/
comment:8 Changed 21 months ago by Rick Waldron
- Status changed from assigned to closed
- Resolution set to fixed
Landing pull request 530. Fixes coniditional path for tr, td defaultDisplay() calls. Fixes #10416.
More Details:
comment:9 Changed 20 months ago by timmywil
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 20 months ago by timmywil
- Status changed from closed to reopened
- Resolution fixed deleted
comment:11 Changed 20 months ago by timmywil
- Owner changed from rwaldron to timmywil
- Status changed from reopened to assigned
- Milestone changed from 1.7 to 1.7.1
comment:12 Changed 20 months ago by rwaldron
#10741 is a duplicate of this ticket.
comment:13 Changed 20 months 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 20 months ago by rwaldron
Which version of FF are you testing in?
comment:15 Changed 20 months ago by rwaldron
To note, the original fix for this bug caused a regression and we plan on revisiting the issue during the 1.7 lifecycle.
comment:17 Changed 19 months 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 15 months ago by mikesherov
#10918 is a duplicate of this ticket.
comment:19 Changed 13 months ago by mikesherov
fully reduced test case: http://jsfiddle.net/73EZY/ confirmed still present in FF12
comment:21 Changed 13 months ago by gibson042
Is this a job for wrapMap?
comment:22 Changed 13 months ago by mikesherov
This looks like a bug in FF itself. Gibson042, can you confirm?
comment:23 follow-up: ↓ 24 Changed 13 months 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 months 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 10 months ago by gibson042
#12272 is a duplicate of this ticket.
comment:26 Changed 8 months ago by timmywil
- Owner timmywil deleted
- Status changed from assigned to open
comment:27 Changed 8 months ago by Oleg
- Status changed from open to closed
- Resolution set to fixed
Fix #10416. Don't trust computed styles on detached elements. Close gh-941.
Changeset: bea5ecbba72f22e8924186d9b81839122ec86aef
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

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