#8395 closed bug (invalid)
.append does not insert strings with html markup, does not always insert strings - jQuery 1.5
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | manipulation | Version: | 1.5.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Running FF 3.6.13 With an empty body tag, or a body tag with a single unattributed, unstyled div.. $('body').append('somestring'); works $('div').append('somestring'); works
$('body').append('<div>asdf</div>'); fails with Node cannot be inserted at the specified point in the hierarchy - code: 3 $('div').append('<div>asdf</div>'); Node cannot be inserted at the specified point in the hierarchy - code: 3
Additionally:
- In tests where the insertion string includes HTML markup that is preceded by non HTML insertion has been found to work -on occasion-
- There are other instances of insertion failure for non-HTML strings in situations that may involve nested matching elements
Change History (9)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Owner: | set to [email protected]… |
---|---|
Status: | new → pending |
No problem, just log in and add your jsfiddle case so the ticket won't be closed.
comment:3 Changed 12 years ago by
Status: | pending → new |
---|
I'm unable to replicate the error with jsFiddle, but it does exist in 'standalone' documents.
Advice?
comment:4 Changed 12 years ago by
Component: | unfiled → manipulation |
---|---|
Priority: | undecided → low |
Status: | new → pending |
I'm having a hard time believing that this is a jQuery bug, considering the high volume of our >4000 unit tests actually do this very operation as part of testing another piece of functionality. If this were the case, the test suite would be failing an unacceptable number of tests (1 fail is considered unacceptable).
Any simple manipulation test should be reproducible in jsFiddle
comment:5 Changed 12 years ago by
I share rwaldron's thoughts on this.
That said, an alternative to you posting the code on jsFiddle is uploading us a zip or HTML file containing the local 'standalone' document tests you've been running. This will allow us to evaluate for certain whether the issue is with jQuery or some aspect of your code. Thanks!
comment:6 Changed 12 years ago by
Status: | pending → new |
---|
Yup. I'm going to do some more work to get an absolute minimum amount of code that reproduces the error and attempt to replicate that in fiddle. I'll submit my results with a link to fiddle, or the code, or a request to close the ticket.
Stay tuned!
comment:7 follow-up: 8 Changed 12 years ago by
Ok, it turns out the minimum amount of code to reproduce the error is jQuery 1.5.1 + a really cool templating plugin I've been maintaining for a couple years. (Orange-J)
I don't even need to run the plugin's code.. just including it breaks something. Can you take a peek and tell me what's broke with this version of jQuery?
I've included a fiddle with embedded source code. http://jsfiddle.net/relativityboy/uGzvK/1/
Close the ticket, but please give me a hand if you can figuring this one out. TIA!
comment:8 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Replying to anonymous:
Ok, it turns out the minimum amount of code to reproduce the error is jQuery 1.5.1 + a really cool templating plugin I've been maintaining for a couple years. (Orange-J)
I don't even need to run the plugin's code.. just including it breaks something. Can you take a peek and tell me what's broke with this version of jQuery?
I've included a fiddle with embedded source code. http://jsfiddle.net/relativityboy/uGzvK/1/
Close the ticket, but please give me a hand if you can figuring this one out. TIA!
Without checking too closely the problem seems to be that your plugin defines it's own jQuery.clone
method and thus overwrites the original one which exists since jQuery 1.5
comment:9 Changed 12 years ago by
Ha! You're right! jQuery co-opted my clone method name.
For a long time I've been thinking about scoping orange-j within a child attribute. Are there any single letter attributes that are safe? $.o.<methodname> or $.j. or $.oj._ some such? I'd really hate to have to retro actively fix something like $('x').snippet()..
Better yet, any thoughts on getting the templating part incorporated into UI?
Sorry about not using jsFiddle...