Bug Tracker

Ticket #1780 (reopened bug)

Opened 1 year ago

Last modified 2 days ago

in jQuery 1.2.1 call to .height() Crashes IE 6.0 and IE 7.0 fully

Reported by: sloppyjoe25s Assigned to: anonymous
Type: bug Priority: major
Milestone: 1.2.2 Component: core
Version: 1.2.1 Keywords: crash,IE
Cc: Needs: Test Case

Description

I have a fairly complicated set up, but with some carefull debugging with good old "alerts" i have found an offending line in jQuery that HARD CRASHES IE 6.0. That means no javascript error, but full browser lock and crash (and of course the real debugger dead). All is fine and dandy in Firefox.

The crash occurs when i call:

$("#objectid").height();

What is worse - this appeared to start ocurring after an IE Update just a couple days ago (like October 4-5 2007). I've confirmed the crash still occurs in jQuery 1.1.4 and 1.1.3.1 as well as in 1.2.1 - and in each case it is the call to get height() which causes the crash.

This is currently bringing a production app of mine to a full standstill to any help would be appreciated (email:sloppyjoe25s@yahoo.com)

The object I'm calling height on is also CSS visbility hidden - which should be OK, but may be a factor .

Attachments

jquery_1780.html (0.7 kB) - added by maxp 1 year ago.
Test case

Change History

Changed 1 year ago by davidserduke

Can you create a focused test case that shows the problem?

Changed 1 year ago by brandon

  • priority changed from critical to major
  • need changed from Patch to Test Case
  • status changed from new to closed
  • resolution set to worksforme
  • milestone changed from 1.2.1 to 1.2.2

I'm not able to reproduce this. Feel free to reopen the ticket if you can create a test case.

Changed 1 year ago by maxp

Test case

Changed 1 year ago by maxp

  • status changed from closed to reopened
  • resolution deleted

I have also encountered this problem and have reduced it to the attached test case jquery_1780.html (also in-line).

To reproduce the problem simply click the "hide" link then click the "get the width" link. This will crash IE7 (and also IE6).

The crash only occurs when the div that you are calling width() on is placed inside the table element but NOT in a td (or tr).

Obviously I can easily work around this by removing the div from the table or placing it within a td but I thought it might still be of interest as it is causing a crash.

Here is the test case:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>
			IE Crash test ... dummies?
		</title>
		<script src="http://code.jquery.com/jquery-latest.js"></script>
	</head>
	<body >
		<table width="100%" border="0" cellpadding="0" cellspacing="5">
			<div class="popup" id="pop_10" title="popup" >here it is!!</div>
			<tr>
				<td><a href="#" onclick="$('#pop_10').css('visibility', 'hidden'); return false;" />hide</a></td>
				<td><a href="#" onclick="$('#pop_10').css('visibility', 'visible'); return false;" />show</a></td>
				<td><a href="#" onclick="alert($('#pop_10').width()); return false;" />get the width</a></td>
			</tr>
		</table>
	</body>
</html>

Changed 1 year ago by davidserduke

  • status changed from reopened to closed
  • resolution set to worksforme

This doesn't crash for me in IE6/7, Opera, Safari, or FF2. Am I missing something?

Even if I am I'm not sure this is worth fixing. IE has always been pretty picky about table elements and this is clearly invalid markup. But without a test case that shows the problem I can't even try some stuff so I have no choice but to close this as works for me.

Changed 2 days ago by hartym

  • status changed from closed to reopened
  • resolution deleted

I faced this problem while deploying a website, and it seems to be reproductible only under Internet Explorer 6 version 6.0.2900.2180.xpsp_sp2_gdr.050301-1519

Opening the test case in a brand new internet explorer makes it hangs for a 20-40 seconds, if i reload it into the same IE though the hang won't be present.

Changed 2 days ago by hartym

By the way, I just noticed that the test case contained invalid pre-closed links, but the same test case using valid links still show the same problem under the given version of IE6 in the previous comment.

Note: See TracTickets for help on using tickets.