aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.mouse.js
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2012-05-14 11:49:44 +0200
committerFelix Nagel <info@felixnagel.com>2012-05-14 11:49:44 +0200
commit41dfb09aeb5df7d53089b58959d21207de63edbe (patch)
tree22053c8f7ddff61f3dfdaed028ef2e2d1a6b68c6 /ui/jquery.ui.mouse.js
parentec5f2ae34ada562903b919d86221d03c9b193a0e (diff)
parent037db084f20d952558e4529a8b7394d562241a97 (diff)
downloadjquery-ui-41dfb09aeb5df7d53089b58959d21207de63edbe.tar.gz
jquery-ui-41dfb09aeb5df7d53089b58959d21207de63edbe.zip
Merge branch 'master' into selectmenu
Diffstat (limited to 'ui/jquery.ui.mouse.js')
-rw-r--r--ui/jquery.ui.mouse.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js
index 64a081961..eaa953ad0 100644
--- a/ui/jquery.ui.mouse.js
+++ b/ui/jquery.ui.mouse.js
@@ -46,11 +46,14 @@ $.widget("ui.mouse", {
// other instances of mouse
_mouseDestroy: function() {
this.element.unbind('.'+this.widgetName);
+ $(document)
+ .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+ .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
},
_mouseDown: function(event) {
// don't let more than one widget handle mouseStart
- if( mouseHandled ) { return };
+ if( mouseHandled ) { return; }
// we may have missed mouseup (out of window)
(this._mouseStarted && this._mouseUp(event));
@@ -58,10 +61,10 @@ $.widget("ui.mouse", {
this._mouseDownEvent = event;
var that = this,
- btnIsLeft = (event.which == 1),
+ btnIsLeft = (event.which === 1),
// event.target.nodeName works around a bug in IE 8 with
// disabled inputs (#7620)
- elIsCancel = (typeof this.options.cancel == "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
+ elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
return true;
}
@@ -131,7 +134,7 @@ $.widget("ui.mouse", {
if (this._mouseStarted) {
this._mouseStarted = false;
- if (event.target == this._mouseDownEvent.target) {
+ if (event.target === this._mouseDownEvent.target) {
$.data(event.target, this.widgetName + '.preventClickEvent', true);
}