aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.mouse.js
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2013-05-24 19:47:42 +0200
committerFelix Nagel <info@felixnagel.com>2013-05-24 19:47:42 +0200
commitcccb8c6e826b8140dd99f225a28cc6f725e86ced (patch)
treebb5ca77b1e1230a059f59d3e86ef933d5bbe03a6 /ui/jquery.ui.mouse.js
parent7e0737edc03d36b07c45981e0a6b58f8aab3824e (diff)
parentc19e7b3496d14b40e71ba892213889fc8cc81d4f (diff)
downloadjquery-ui-cccb8c6e826b8140dd99f225a28cc6f725e86ced.tar.gz
jquery-ui-cccb8c6e826b8140dd99f225a28cc6f725e86ced.zip
Merge branch 'master' into selectmenu
Diffstat (limited to 'ui/jquery.ui.mouse.js')
-rw-r--r--ui/jquery.ui.mouse.js20
1 files changed, 13 insertions, 7 deletions
diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js
index df887d334..ca774e3da 100644
--- a/ui/jquery.ui.mouse.js
+++ b/ui/jquery.ui.mouse.js
@@ -48,7 +48,7 @@ $.widget("ui.mouse", {
_mouseDestroy: function() {
this.element.unbind("."+this.widgetName);
if ( this._mouseMoveDelegate ) {
- $(document)
+ this.document
.unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
.unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
}
@@ -99,9 +99,10 @@ $.widget("ui.mouse", {
this._mouseUpDelegate = function(event) {
return that._mouseUp(event);
};
- $(document)
- .bind("mousemove."+this.widgetName, this._mouseMoveDelegate)
- .bind("mouseup."+this.widgetName, this._mouseUpDelegate);
+
+ this.document
+ .bind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
+ .bind( "mouseup." + this.widgetName, this._mouseUpDelegate );
event.preventDefault();
@@ -114,6 +115,10 @@ $.widget("ui.mouse", {
if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
return this._mouseUp(event);
}
+ // Iframe mouseup check - mouseup occurred in another document
+ else if ( !event.which ) {
+ return this._mouseUp( event );
+ }
if (this._mouseStarted) {
this._mouseDrag(event);
@@ -130,9 +135,9 @@ $.widget("ui.mouse", {
},
_mouseUp: function(event) {
- $(document)
- .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
- .unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
+ this.document
+ .unbind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
+ .unbind( "mouseup." + this.widgetName, this._mouseUpDelegate );
if (this._mouseStarted) {
this._mouseStarted = false;
@@ -144,6 +149,7 @@ $.widget("ui.mouse", {
this._mouseStop(event);
}
+ mouseHandled = false;
return false;
},