NullVoxPopuli
NullVoxPopuli

Reputation: 65173

jQuery: Nested Sortable Items work fine in good browsers, but in IE7, both the sortable child, and the parent drag at the same time

Here is my code for you all to play with: http://jsfiddle.net/SMqR9/1/ =D

works fine in Chrome, FF, Safari, Good Browsers, etc.

But when in IE7, when I click on "New Content" and drag, it moves the section it's in also (and at different speeds). Really weird behavior. Any ideas as to what is causing this?

Upvotes: 2

Views: 458

Answers (1)

Semyazas
Semyazas

Reputation: 2101

Please see here for a working solution:

http://jsfiddle.net/SMqR9/16/

Most important part is this:

    $j('ul').bind('mousedown', function(e) {
  e.stopPropagation();
});

Which stops IE7 from having nested sortable elements bubble up the mousedown-event to their parent items. Make sure to use .bind(), as .live() only takes place after the event already bubbled up

Upvotes: 3

Related Questions