aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.mouse.js
diff options
context:
space:
mode:
authorawgy <josh.varner@gmail.com>2010-11-03 02:45:47 -0500
committerScott González <scott.gonzalez@gmail.com>2010-11-09 09:52:24 -0500
commite2a693ba78be5a8d9bbe0b55e48d82860a1bbdc3 (patch)
treed78d3e6378983f473c0e90ec85f0a9c062d84a06 /ui/jquery.ui.mouse.js
parent412d1aa1c9ac0a8a933710fef6d233a061fb9d13 (diff)
downloadjquery-ui-e2a693ba78be5a8d9bbe0b55e48d82860a1bbdc3.tar.gz
jquery-ui-e2a693ba78be5a8d9bbe0b55e48d82860a1bbdc3.zip
Mouse: tie the preventClickEvent property to the event target, not the container. Fixes #4752 - link event firing on sortable with connect list
Diffstat (limited to 'ui/jquery.ui.mouse.js')
-rw-r--r--ui/jquery.ui.mouse.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js
index d0c82f83f..bfe8640a2 100644
--- a/ui/jquery.ui.mouse.js
+++ b/ui/jquery.ui.mouse.js
@@ -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;
}
@@ -118,7 +118,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);
}