summaryrefslogtreecommitdiff
path: root/resources/jquery.ui/jquery.ui.mouse.js
diff options
context:
space:
mode:
Diffstat (limited to 'resources/jquery.ui/jquery.ui.mouse.js')
-rw-r--r--resources/jquery.ui/jquery.ui.mouse.js33
1 files changed, 19 insertions, 14 deletions
diff --git a/resources/jquery.ui/jquery.ui.mouse.js b/resources/jquery.ui/jquery.ui.mouse.js
index 871edd83..b8db85ce 100644
--- a/resources/jquery.ui/jquery.ui.mouse.js
+++ b/resources/jquery.ui/jquery.ui.mouse.js
@@ -1,16 +1,16 @@
/*!
- * jQuery UI Mouse 1.8.2
+ * jQuery UI Mouse 1.8.11
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Mouse
*
* Depends:
* jquery.ui.widget.js
*/
-(function($) {
+(function( $, undefined ) {
$.widget("ui.mouse", {
options: {
@@ -26,8 +26,8 @@ $.widget("ui.mouse", {
return self._mouseDown(event);
})
.bind('click.'+this.widgetName, function(event) {
- if(self._preventClickEvent) {
- self._preventClickEvent = false;
+ if (true === $.data(event.target, self.widgetName + '.preventClickEvent')) {
+ $.removeData(event.target, self.widgetName + '.preventClickEvent');
event.stopImmediatePropagation();
return false;
}
@@ -75,6 +75,11 @@ $.widget("ui.mouse", {
}
}
+ // Click event may never have fired (Gecko & Opera)
+ if (true === $.data(event.target, this.widgetName + '.preventClickEvent')) {
+ $.removeData(event.target, this.widgetName + '.preventClickEvent');
+ }
+
// these delegates are required to keep context
this._mouseMoveDelegate = function(event) {
return self._mouseMove(event);
@@ -86,18 +91,14 @@ $.widget("ui.mouse", {
.bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
.bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
- // preventDefault() is used to prevent the selection of text here -
- // however, in Safari, this causes select boxes not to be selectable
- // anymore, so this fix is needed
- ($.browser.safari || event.preventDefault());
-
+ event.preventDefault();
event.originalEvent.mouseHandled = true;
return true;
},
_mouseMove: function(event) {
// IE mouseup check - mouseup happened when mouse was out of window
- if ($.browser.msie && !event.button) {
+ if ($.browser.msie && !(document.documentMode >= 9) && !event.button) {
return this._mouseUp(event);
}
@@ -122,7 +123,11 @@ $.widget("ui.mouse", {
if (this._mouseStarted) {
this._mouseStarted = false;
- this._preventClickEvent = (event.target == this._mouseDownEvent.target);
+
+ if (event.target == this._mouseDownEvent.target) {
+ $.data(event.target, this.widgetName + '.preventClickEvent', true);
+ }
+
this._mouseStop(event);
}