Skip to content
Permalink
Browse files

Merge pull request #413 from kborchers/bug_4333_3

Mouse: Changed mouseHandled check to a local var rather than using originalEvent. Fixed #4333 - Nested draggables problem in IE
  • Loading branch information
scottgonzalez committed Aug 2, 2011
2 parents 6ca310f + dafc941 commit e15c32d06763afd2376c61642397e7fc98338958
Showing with 8 additions and 4 deletions.
  1. +8 −4 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;
},

0 comments on commit e15c32d

Please sign in to comment.
You can’t perform that action at this time.