Skip to main content

Bug Tracker

Side navigation

#9339 closed bug (worksforme)

Opened May 18, 2011 11:46PM UTC

Closed May 19, 2011 04:58AM UTC

Last modified May 20, 2011 07:55AM UTC

weird insert behavior

Reported by: Gijs Owned by:
Priority: low Milestone: 1.next
Component: manipulation Version:
Keywords: Cc:
Blocked by: Blocking:
Description

all jquery versions,

all browsers,

windows vista,

to explain the problem see this jsfiddle

http://jsfiddle.net/Fx74b/12/

I'm beginning to wander if this is a bug..

i can't figure it out

Attachments (0)
Change History (2)

Changed May 19, 2011 04:58AM UTC by addyosmani comment:1

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

Thanks for submitting a ticket to the jQuery Project!. I've tested your code across a number of browsers (and wondered why the rendered output being generated was incorrect), but then noticed that your markup appears to contain an issue. Rather than:

</ul><h1>Title</h1><ul>

I believe you meant:

<ul><h1>Title</h1></ul>

If you test this latter version (Firefox, Chrome etc), you'll find that it should behave as expected now.

Revised test case: http://jsfiddle.net/Fx74b/13/

Changed May 20, 2011 07:55AM UTC by Gijs comment:2

That doesn't solve the case, i need to close the list, add a title and open the list again. The solution you gave is adding a list inside of the list.

The output needs to be like this:

<ul>

<li>1</li>

<li>2</li>

<li class="afterthis">3</li></ul><h1>Title</h1><ul>

<li>4</li>

<li>5</li>

</ul>