]> source.dussan.org Git - jquery-ui.git/commitdiff
Widget: Set event.target in ._trigger(). Fixes #7852 - Droppable event target changes...
authorScott González <scott.gonzalez@gmail.com>
Thu, 10 Nov 2011 12:58:44 +0000 (07:58 -0500)
committerScott González <scott.gonzalez@gmail.com>
Thu, 10 Nov 2011 12:59:33 +0000 (07:59 -0500)
(cherry picked from commit 1b165148a6654f64d572bd4c28ddb2cee5f6a332)

ui/jquery.ui.widget.js

index 4aa42e0b7ed39e1e35349c32bd38fe129796824a..7eea40e7015e7fdb2d7a6fb5aba500700a330981 100644 (file)
@@ -257,6 +257,10 @@ $.Widget.prototype = {
                        }
                }
 
+               // the original event may come from any element
+               // so we need to reset the target on the new event
+               event.target = this.element[0];
+
                this.element.trigger( event, data );
 
                return !( $.isFunction(callback) &&