diff options
author | Scott González <scott.gonzalez@gmail.com> | 2009-01-15 19:40:11 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2009-01-15 19:40:11 +0000 |
commit | 41ed54aaf6aba6cf06c0c5a753d6e8e8673d1734 (patch) | |
tree | fee8313e2df346fb9c72d840e0c3c50c4d66d5bd /ui/ui.core.js | |
parent | 3ead714520d7da6cdbeb6639df34a32d855c75ca (diff) | |
download | jquery-ui-41ed54aaf6aba6cf06c0c5a753d6e8e8673d1734.tar.gz jquery-ui-41ed54aaf6aba6cf06c0c5a753d6e8e8673d1734.zip |
Widget factory: Fixed event triggering (again).
Draggable: To modify the position during drag, you now set ui.position instead of returning new coords.
Diffstat (limited to 'ui/ui.core.js')
-rw-r--r-- | ui/ui.core.js | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/ui/ui.core.js b/ui/ui.core.js index 4afd2066f..c77e99999 100644 --- a/ui/ui.core.js +++ b/ui/ui.core.js @@ -370,20 +370,13 @@ $.widget.prototype = { eventName = (type == this.widgetEventPrefix ? type : this.widgetEventPrefix + type); - // event can be null, a hash, a native event, a fixed event - event = event ? $.extend(event, $.Event()) : $.Event(); + event = $.Event(event); event.type = eventName; this.element.trigger(event, data); - var callbackResult = callback - ? callback.call(this.element[0], event, data) - : undefined; - - event.result = callbackResult !== undefined - ? callbackResult - : event.result; - - return event.result !== false; + + return !(callback && callback.call(this.element[0], event, data) === false + || event.isDefaultPrevented()); } }; |