Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#10727 closed bug (invalid)

With 1.7 droppable() event target changed

Reported by: marc@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7
Keywords: Cc:
Blocked by: Blocking:

Description

Under 1.6.2 the event target on a droppable drop was the element that the drop occurred to, whereas with 1.7 the event target becomes the element being dropped.

If you drop 'one' onto 'two', under 1.7 the console shows 'one' whereas under 1.6.2 it shows 'two':

<!DOCTYPE HTML> <html> <head> <!-- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> -->

<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.min.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" type="text/javascript"></script> <script> function OnDrop(e, ui) {

console.log(e.target.id);

}

$(document).ready(function () {

$("#one").draggable(); $("#two").droppable({ drop: OnDrop });

});

</script>

</head> <body> <div id="one">one</div> <div id="two">two</div> </body> </html>

Change History (3)

comment:1 Changed 8 years ago by dmethvin

Resolution: invalid
Status: newclosed

This should be reported to the UI folks at dev.jqueryui.com and they can determine if it is caused by a core bug. Thanks!

comment:2 Changed 8 years ago by anonymous

Sadly every significant operation I try on that site crashes.

comment:3 Changed 8 years ago by marc@…

Here is the UI ticket: http://bugs.jqueryui.com/ticket/7852

I do find it somewhat disturbing that while they may 'fix' it, fundamentally an underlying assumption of some kind has changed, and it's not clear to me if that's intentional or not. In other words, how many more things would be expected to break due to this change?

Note: See TracTickets for help on using tickets.