aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkborchers <k_borchers@yahoo.com>2011-08-02 08:36:22 -0500
committerScott González <scott.gonzalez@gmail.com>2011-08-02 19:25:34 -0400
commit14ab4f4f374ddda1eaa552072e6e3a86a91db4bd (patch)
tree5d9fec27871e84c69646449f62a2737f5694bc68
parent82df6924cbb0fa080590d83b4edc6183dd05ce93 (diff)
downloadjquery-ui-14ab4f4f374ddda1eaa552072e6e3a86a91db4bd.tar.gz
jquery-ui-14ab4f4f374ddda1eaa552072e6e3a86a91db4bd.zip
Mouse: Changed mouseHandled check to a local var rather than using originalEvent. Fixed #4333 - Nested draggables problem in IE
(cherry picked from commit dafc941b3632bb79823a72c36bfae7f1f985ca25)
-rw-r--r--ui/jquery.ui.mouse.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js
index 7e38c69c4..5efa5e63a 100644
--- a/ui/jquery.ui.mouse.js
+++ b/ui/jquery.ui.mouse.js
@@ -12,6 +12,11 @@
*/
(function( $, undefined ) {
+var mouseHandled = false;
+$( document ).mouseup( 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;
},