aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.mouse.js
diff options
context:
space:
mode:
authorkborchers <k_borchers@yahoo.com>2011-08-02 08:36:22 -0500
committerkborchers <k_borchers@yahoo.com>2011-08-02 08:36:22 -0500
commitdafc941b3632bb79823a72c36bfae7f1f985ca25 (patch)
tree4465064f58d5826db04b8653bac41f5d12e8e073 /ui/jquery.ui.mouse.js
parent70687f7955cb2471ad6df3a7806031245e5979cd (diff)
downloadjquery-ui-dafc941b3632bb79823a72c36bfae7f1f985ca25.tar.gz
jquery-ui-dafc941b3632bb79823a72c36bfae7f1f985ca25.zip
Mouse: Changed mouseHandled check to a local var rather than using originalEvent. Fixed #4333 - Nested draggables problem in IE
Diffstat (limited to 'ui/jquery.ui.mouse.js')
-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 054e5dc63..3e6ead8cd 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", {
version: "@VERSION",
options: {
@@ -45,9 +50,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));
@@ -93,7 +96,8 @@ $.widget("ui.mouse", {
.bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
event.preventDefault();
- event.originalEvent.mouseHandled = true;
+
+ mouseHandled = true;
return true;
},