Skip to content

Commit 350e4ab

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 9c50bdf.
1 parent 38028f6 commit 350e4ab

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
version: "@VERSION",
2217
options: {
@@ -50,7 +45,9 @@ $.widget("ui.mouse", {
5045

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

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

9895
event.preventDefault();
99-
100-
mouseHandled = true;
96+
event.originalEvent.mouseHandled = true;
10197
return true;
10298
},
10399

0 commit comments

Comments
 (0)