Skip to main content

Bug Tracker

Side navigation

#10955 closed bug (worksforme)

Opened December 05, 2011 09:41PM UTC

Closed December 06, 2011 04:50AM UTC

Last modified December 06, 2011 08:24AM UTC

Brower crashing or either hanging when we are using Jquery Clone method.This happens in all browser

Reported by: kiran@vasanti.org Owned by: kiran@vasanti.org
Priority: low Milestone: None
Component: manipulation Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:
Description

Hi,

All my browser are either hanging or crashing due to below code,Any ideas as what is happening.While debugging my jsp page, I narrowed down to below clone method of jquery and was able to reproduce it with below simple test case.Also as per my understanding there are some tags in HTML5 which do not require to have end tags, does UL require end tag as per HTML5 ?.

<!DOCTYPE HTML>

<html>

<head>

<meta charset="utf-8">

<title>Simple Test Case</title>

</head>

<body>

<ul>

<li>Test1</li>

<li>Test2</li>

<li>Test3</li>

<li>Test4</li>

<li>Test5</li>

<li>Test6</li>

</ul>

<script type="text/javascript" src="js/jquery-1.6.4.js"></script>

<script>

jQuery('ul').clone().appendTo('body');

</script>

</body>

</html>

I find this hang or crash issues with singleton HTML 5 Tags.Appreciate in case if you take a look and suggest.

Attachments (0)
Change History (6)

Changed December 05, 2011 10:36PM UTC by sindresorhus comment:1

owner: → kiran@vasanti.org
status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.

Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.

Changed December 06, 2011 03:32AM UTC by kiran@vasanti.org comment:2

status: pendingnew

I dont see the browser crash in jsFiddle when I followed your instructions.

Here is the link http://jsfiddle.net/kiranbadi1991/eEqED/

Sounds strange that the browser did not hang on jsfiddle and it kills when I load the same code via my browser with jsfiddle.

Replying to [comment:1 sindresorhus]:

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket. Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.

Changed December 06, 2011 03:34AM UTC by kiran@vasanti.org comment:3

Sorry there is some typo error

Please read this as "Sounds strange that the browser did not hang on jsfiddle and it kills when I load the same code via my browser with jsfiddle."

as

"Sounds strange that the browser did not hang on jsfiddle and it kills when I load the same code via my browser without jsfiddle"

Changed December 06, 2011 04:50AM UTC by rwaldron comment:4

component: unfiledmanipulation
priority: undecidedlow
resolution: → worksforme
status: newclosed

That is generally an indication that issue lies in your code and not in jQuery, this works fine for me

Changed December 06, 2011 05:18AM UTC by kiran@vasanti.org comment:5

Hi, you mean to say that you have tried below code and its working fine in your browser without crash or hang.It does not work any of my browsers without hang or crash.

What version of jquery did you use ? I am using jquery 1.6.4.

<!DOCTYPE HTML>

<html>

<head>

<meta charset="utf-8">

<title>Simple Test Case</title>

<script type="text/javascript" src="js/jquery-1.6.4.js"></script>

</head>

<body>

<ul>

<li>Test1</li>

<li>Test2</li>

<li>Test3</li>

<li>Test4</li>

<li>Test5</li>

<li>Test6</li>

<script>

jQuery('ul').clone().appendTo('body');

</script>

</body>

</html>

Replying to [comment:4 rwaldron]:

That is generally an indication that issue lies in your code and not in jQuery, this works fine for me

Changed December 06, 2011 08:24AM UTC by sindresorhus comment:6

Just to explain, you get the crash since you're not closing your <ul> tag, and the browser is then awesome and thinks your script tag i a part of the ul, and the script then tries to clone the <ul> with the <li>s and the <script> tag itself.