Skip to content

Commit bd48ddf

Browse files
committed
Revert "Mouse: Changed mouseHandled check to a local var rather than using originalEvent. Fixed #4333 - Nested draggables problem in IE"
This reverts commit 7eda94a.
1 parent b796cc5 commit bd48ddf

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

ui/jquery.ui.mouse.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
*/
1313
(function( $, undefined ) {
1414

15-
var mouseHandled = false;
16-
$(document).mousedown(function(e) {
17-
mouseHandled = false;
18-
});
19-
2015
$.widget("ui.mouse", {
2116
options: {
2217
cancel: ':input,option',
@@ -49,7 +44,9 @@ $.widget("ui.mouse", {
4944

5045
_mouseDown: function(event) {
5146
// don't let more than one widget handle mouseStart
52-
if(mouseHandled) {return};
47+
// TODO: figure out why we have to use originalEvent
48+
event.originalEvent = event.originalEvent || {};
49+
if (event.originalEvent.mouseHandled) { return; }
5350

5451
// we may have missed mouseup (out of window)
5552
(this._mouseStarted && this._mouseUp(event));
@@ -95,8 +92,7 @@ $.widget("ui.mouse", {
9592
.bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
9693

9794
event.preventDefault();
98-
99-
mouseHandled = true;
95+
event.originalEvent.mouseHandled = true;
10096
return true;
10197
},
10298

0 commit comments

Comments
 (0)