#10727 closed bug (invalid)
With 1.7 droppable() event target changed
Reported by: | 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 11 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:3 Changed 11 years ago by
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?
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!