Skip to content

Commit

Permalink
Revert "Mouse: Changed mouseHandled check to a local var rather than …
Browse files Browse the repository at this point in the history
…using originalEvent. Fixed #4333 - Nested draggables problem in IE"

This reverts commit 7eda94a.
  • Loading branch information
scottgonzalez committed Aug 1, 2011
1 parent b796cc5 commit bd48ddf
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions ui/jquery.ui.mouse.js
Expand Up @@ -12,11 +12,6 @@
*/
(function( $, undefined ) {

var mouseHandled = false;
$(document).mousedown(function(e) {
mouseHandled = false;
});

$.widget("ui.mouse", {
options: {
cancel: ':input,option',
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -95,8 +92,7 @@ $.widget("ui.mouse", {
.bind('mouseup.'+this.widgetName, this._mouseUpDelegate);

event.preventDefault();

mouseHandled = true;
event.originalEvent.mouseHandled = true;
return true;
},

Expand Down

0 comments on commit bd48ddf

Please sign in to comment.