mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Revert "Mouse: Changed mouseHandled check to a local var rather than using originalEvent. Fixed #4333 - Nested draggables problem in IE"
This reverts commit 7eda94a8c9
.
This commit is contained in:
parent
b796cc57bd
commit
bd48ddfa94
12
ui/jquery.ui.mouse.js
vendored
12
ui/jquery.ui.mouse.js
vendored
@ -12,11 +12,6 @@
|
|||||||
*/
|
*/
|
||||||
(function( $, undefined ) {
|
(function( $, undefined ) {
|
||||||
|
|
||||||
var mouseHandled = false;
|
|
||||||
$(document).mousedown(function(e) {
|
|
||||||
mouseHandled = false;
|
|
||||||
});
|
|
||||||
|
|
||||||
$.widget("ui.mouse", {
|
$.widget("ui.mouse", {
|
||||||
options: {
|
options: {
|
||||||
cancel: ':input,option',
|
cancel: ':input,option',
|
||||||
@ -49,7 +44,9 @@ $.widget("ui.mouse", {
|
|||||||
|
|
||||||
_mouseDown: function(event) {
|
_mouseDown: function(event) {
|
||||||
// don't let more than one widget handle mouseStart
|
// 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)
|
// we may have missed mouseup (out of window)
|
||||||
(this._mouseStarted && this._mouseUp(event));
|
(this._mouseStarted && this._mouseUp(event));
|
||||||
@ -95,8 +92,7 @@ $.widget("ui.mouse", {
|
|||||||
.bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
|
.bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
|
||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
event.originalEvent.mouseHandled = true;
|
||||||
mouseHandled = true;
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user