diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-08-01 14:17:38 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-08-01 14:17:38 -0400 |
commit | bd48ddfa94ff673cc5dfef749fe0565f1bc02d0f (patch) | |
tree | 0f232aa0c0aac43188642c244217376286ef0c86 | |
parent | b796cc57bd1eb0557849ece88c5794b70656f5cd (diff) | |
download | jquery-ui-bd48ddfa94ff673cc5dfef749fe0565f1bc02d0f.tar.gz jquery-ui-bd48ddfa94ff673cc5dfef749fe0565f1bc02d0f.zip |
Revert "Mouse: Changed mouseHandled check to a local var rather than using originalEvent. Fixed #4333 - Nested draggables problem in IE"
This reverts commit 7eda94a8c916760de4093df85f58cc694838b52b.
-rw-r--r-- | ui/jquery.ui.mouse.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js index 2fb1389f2..7e38c69c4 100644 --- a/ui/jquery.ui.mouse.js +++ b/ui/jquery.ui.mouse.js @@ -12,11 +12,6 @@ */ (function( $, undefined ) { -var mouseHandled = false; -$(document).mousedown(function(e) { - mouseHandled = false; -}); - $.widget("ui.mouse", { options: { cancel: ':input,option', @@ -49,7 +44,9 @@ $.widget("ui.mouse", { _mouseDown: function(event) { // don't let more than one widget handle mouseStart - if(mouseHandled) {return}; + // TODO: figure out why we have to use originalEvent + event.originalEvent = event.originalEvent || {}; + if (event.originalEvent.mouseHandled) { return; } // we may have missed mouseup (out of window) (this._mouseStarted && this._mouseUp(event)); @@ -95,8 +92,7 @@ $.widget("ui.mouse", { .bind('mouseup.'+this.widgetName, this._mouseUpDelegate); event.preventDefault(); - - mouseHandled = true; + event.originalEvent.mouseHandled = true; return true; }, |