#10955 closed bug (worksforme)
Brower crashing or either hanging when we are using Jquery Clone method.This happens in all browser
Reported by: | Owned by: | ||
---|---|---|---|
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.
Change History (6)
comment:1 follow-up: 2 Changed 11 years ago by
Owner: | set to [email protected]… |
---|---|
Status: | new → pending |
comment:2 Changed 11 years ago by
Status: | pending → new |
---|
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 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.
comment:3 Changed 11 years ago by
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"
comment:4 follow-up: 5 Changed 11 years ago by
Component: | unfiled → manipulation |
---|---|
Priority: | undecided → low |
Resolution: | → worksforme |
Status: | new → closed |
That is generally an indication that issue lies in your code and not in jQuery, this works fine for me
comment:5 Changed 11 years ago by
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 rwaldron:
That is generally an indication that issue lies in your code and not in jQuery, this works fine for me
comment:6 Changed 11 years ago by
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.
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.