Opened 5 years ago
Closed 4 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
.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 5 years ago by timmywil
- Component changed from unfiled to effects
- Priority changed from undecided to low
- Resolution set to invalid
- Status changed from new to closed
comment:2 Changed 5 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 5 years ago by timmywil
- Resolution invalid deleted
- Status changed from closed to reopened
- 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 5 years ago by timmywil
- Milestone changed from None to 1.next
- Status changed from reopened to open
comment:5 Changed 5 years ago by rwaldron
- Owner set to rwaldron
- Status changed from open to assigned
comment:6 Changed 5 years ago by timmywil
I've only checked FF 7 so far: http://jsfiddle.net/timmywil/mh8mF/9/
comment:7 Changed 5 years ago by timmywil
- Milestone changed from 1.next to 1.7
comment:8 Changed 5 years ago by Rick Waldron
- Resolution set to fixed
- Status changed from assigned to closed
Landing pull request 530. Fixes coniditional path for tr, td defaultDisplay() calls. Fixes #10416.
More Details:
comment:9 Changed 5 years 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 5 years ago by timmywil
- Resolution fixed deleted
- Status changed from closed to reopened
comment:11 Changed 5 years ago by timmywil
- Milestone changed from 1.7 to 1.7.1
- Owner changed from rwaldron to timmywil
- Status changed from reopened to assigned
comment:12 Changed 5 years ago by rwaldron
#10741 is a duplicate of this ticket.
comment:13 Changed 5 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 5 years ago by rwaldron
Which version of FF are you testing in?
comment:15 Changed 5 years 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:16 Changed 5 years ago by rwaldron
- Milestone changed from 1.7.1 to 1.next
comment:17 Changed 5 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 4 years ago by mikesherov
#10918 is a duplicate of this ticket.
comment:19 Changed 4 years ago by mikesherov
fully reduced test case: http://jsfiddle.net/73EZY/ confirmed still present in FF12
comment:20 Changed 4 years ago by mikesherov
- Keywords FF added
comment:21 Changed 4 years ago by gibson042
Is this a job for wrapMap?
comment:22 Changed 4 years ago by mikesherov
This looks like a bug in FF itself. Gibson042, can you confirm?
comment:23 follow-up: ↓ 24 Changed 4 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 4 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 4 years ago by gibson042
#12272 is a duplicate of this ticket.
comment:26 Changed 4 years ago by timmywil
- Owner timmywil deleted
- Status changed from assigned to open
comment:27 Changed 4 years ago by Oleg
- Resolution set to fixed
- Status changed from open to closed
Fix #10416. Don't trust computed styles on detached elements. Close gh-941.
Changeset: bea5ecbba72f22e8924186d9b81839122ec86aef

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