Skip to main content

Bug Tracker

Side navigation

#10100 closed bug (invalid)

Opened August 19, 2011 09:30PM UTC

Closed September 05, 2011 07:55AM UTC

After resize firefox with ctrl+ the width calculation fail.

Reported by: szetamas@gmail.com Owned by: szetamas@gmail.com
Priority: low Milestone: None
Component: misc Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:
Description

Firefox 6.0, Jquery 1.6.2

Here is the example. Load this html, and use ctrl+ (after ctrl-).

The calculated width wrong. (checked with firebug)

<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http:www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Wrong width demo</title>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>

<script type="text/javascript">

$(document).ready(function() {

debugJqueryTableWidths();

window.onresize = function(event) {

debugJqueryTableWidths();

}

});

function debugJqueryTableWidths() {

var widths = new Array();

$('#testTable').find('tr:first').find('td').each(function() {

widths.push($(this).width());

})

log(widths);

}

var log = function(message) {

var $debug = $("#debugdiv");

if ($debug.length == 0) {

$("body").append("<div id='debugdiv'/>");

$debug = $("#debugdiv");

}

$debug.append(message + "<br/>");

};

</script>

<style type="text/css">

table td, table th {

border: 1px solid black;

}

</style>

</head>

<body>

Use Ctrl+ and Ctrl- and after you see the new calculated widths of table.

These ar wrong with jquery 1.6.2, in firefox.

<table id="testTable">

<tr>

<td>test</td>

<td>testtest</td>

</tr>

</table>

</body>

</html>

Attachments (0)
Change History (2)

Changed August 22, 2011 05:47AM UTC by addyosmani comment:1

component: unfiledmisc
owner: → szetamas@gmail.com
priority: undecidedlow
status: newpending

Thanks for submitting a ticket to the jQuery bug tracker! Can you please reduce this test case further and post it on jsFiddle.net?

Changed September 05, 2011 07:55AM UTC by trac-o-bot comment:2

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!