*/
(function( $, undefined ) {
-var mouseHandled = false;
-$(document).mousedown(function(e) {
- mouseHandled = false;
-});
-
$.widget("ui.mouse", {
options: {
cancel: ':input,option',
_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));
.bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
event.preventDefault();
-
- mouseHandled = true;
+ event.originalEvent.mouseHandled = true;
return true;
},