Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#7253 closed bug (invalid)

.text() function issue in IE print preview on table cell or td

Reported by: [email protected] Owned by:
Priority: undecided Milestone: 1.5
Component: unfiled Version: 1.4.3
Keywords: Cc:
Blocked by: Blocking:



Either I cannot find the existing bug report or searching for it is harder even in google search.

As we know IE will not render border of table td (table cell) until it contain something inside. So to show border in empty cell I put single space " " or " ".

Today I found at least IE7 does not render a border during print preview whenever I use .text(" "). There is a different when setting .html(" ") and .text(" "). Both functions will show a border in normal browsing. However when I open Print Preview, only .html(" ") working but .text(" ") is not.

When I check with FireBug lite, both functions set the same single space. I believe this is a bug in IE7. However we can make it more developer friendly with making .text(" ") uses .html(" ") internal functions for at least IE7.

Hope this will help you to save other programmers time.


Change History (2)

comment:1 Changed 12 years ago by snover

Resolution: invalid
Status: newclosed

Thanks for the report, but this is not a jQuery bug. .text(" ") does the same thing as .html(" "). You can’t use a regular space to prevent a table cell from collapsing.

comment:2 Changed 12 years ago by anonymous


This might not be a bug but maybe a feature that .text(" ") will do a magic which uses .html(" ") internally (theoretically it should be the same but just because of bug in IE7, this magic would normalize it) to prevent a table cell from collapsing on IE7. Here is the working sample:


Thank you.

Note: See TracTickets for help on using tickets.