#11132 closed bug (cantfix)
.width() on hidden cell messes up table layout in Google Chrome
Reported by: | romario333 | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | dimensions | Version: | 1.7.1 |
Keywords: | Cc: | timmywil | |
Blocked by: | Blocking: |
Description
When you call .width() on a hidden cell and than make it visible, the cell is shifted to the right from its original position.
This happens only in Google Chrome (16.0.912.63), in Firefox and IE the table renders correctly.
Here is a simple test case: http://jsfiddle.net/tuR2S/
Change History (8)
comment:1 follow-up: 3 Changed 11 years ago by
Component: | unfiled → dimensions |
---|---|
Priority: | undecided → low |
Resolution: | → invalid |
Status: | new → closed |
comment:3 Changed 11 years ago by
Replying to timmywil:
There is a temporary swap occurring, but given that all of the settable properties are reset properly, the original fiddle can only be a webkit issue.
Nevertheless, if one uses jQuery to show it, the issue does not occur.
Not true, when you call show and width on a single cell, issue still occurs:
comment:4 Changed 11 years ago by
I've reported this issue to WebKit project:
https://bugs.webkit.org/show_bug.cgi?id=75798
I believe jQuery should have workaround for this bug though as I don't know how long it will take guys at WebKit to fix it.
comment:6 Changed 11 years ago by
Cc: | timmywil added |
---|---|
Keywords: | needsreview added |
Resolution: | invalid |
Status: | closed → reopened |
Re-opening as this was brought up again in http://bugs.jquery.com/ticket/11156. Given that the submitter believes this is a WebKit issue, do we feel it's widely enough experienced to even consider a workaround?
comment:7 Changed 11 years ago by
Keywords: | needsreview removed |
---|---|
Resolution: | → cantfix |
Status: | reopened → closed |
It seems the duplicate was created by the op of this ticket. @romario333: Let's keep the discussion of this issue in this ticket.
As I said before, I don't think there's anything we can do since the css is being reset to their original display values correctly, but webkit is not rendering as it should. A workaround is to show the cell in webkit with .css('display', 'block'), but this would not be viable for core.
comment:8 Changed 11 years ago by
Ok, I understand that this cannot be easily solved in core.
Your workaround works only in simple scenarios. Problem is that table cell's display should be "table-cell" rather than "block". When it's set to "block", it can lead to other formatting issues. But when you set it to "table-cell", workaround no longer works :(
There is a temporary swap occurring, but given that all of the settable properties are reset properly, the original fiddle can only be a webkit issue.
Nevertheless, if one uses jQuery to show it, the issue does not occur.
http://jsfiddle.net/timmywil/tuR2S/2/