diff options
author | kborchers <k_borchers@yahoo.com> | 2011-05-09 11:43:45 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-05-09 13:12:20 -0400 |
commit | 7eda94a8c916760de4093df85f58cc694838b52b (patch) | |
tree | 859294b563e0133f73d63d61dfd49c6fcb580246 /ui | |
parent | 73602652acd6908acaad27c29a5e3562e7538b5b (diff) | |
download | jquery-ui-7eda94a8c916760de4093df85f58cc694838b52b.tar.gz jquery-ui-7eda94a8c916760de4093df85f58cc694838b52b.zip |
Mouse: Changed mouseHandled check to a local var rather than using originalEvent. Fixed #4333 - Nested draggables problem in IE
(cherry picked from commit 9c50bdfde0260fc8412eec1c5020ed6b61558ebd)
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.mouse.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js index bfe4a7578..0bd38db85 100644 --- a/ui/jquery.ui.mouse.js +++ b/ui/jquery.ui.mouse.js @@ -12,6 +12,11 @@ */ (function( $, undefined ) { +var mouseHandled = false; +$(document).mousedown(function(e) { + mouseHandled = false; +}); + $.widget("ui.mouse", { options: { cancel: ':input,option', @@ -44,9 +49,7 @@ $.widget("ui.mouse", { _mouseDown: function(event) { // don't let more than one widget handle mouseStart - // TODO: figure out why we have to use originalEvent - event.originalEvent = event.originalEvent || {}; - if (event.originalEvent.mouseHandled) { return; } + if(mouseHandled) {return}; // we may have missed mouseup (out of window) (this._mouseStarted && this._mouseUp(event)); @@ -92,7 +95,8 @@ $.widget("ui.mouse", { .bind('mouseup.'+this.widgetName, this._mouseUpDelegate); event.preventDefault(); - event.originalEvent.mouseHandled = true; + + mouseHandled = true; return true; }, |