aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2008-12-31 14:28:56 +0000
committerScott González <scott.gonzalez@gmail.com>2008-12-31 14:28:56 +0000
commit30e4470a2c46847e6e4eb98f49f6399d01feb9c2 (patch)
tree6f95c523d99ddffa5305cf4c55e209176f362068
parent74f061c7165140caf14354c053a79d4c5a2b20ed (diff)
downloadjquery-ui-30e4470a2c46847e6e4eb98f49f6399d01feb9c2.tar.gz
jquery-ui-30e4470a2c46847e6e4eb98f49f6399d01feb9c2.zip
Widget Factory: Check the target in getData and setData events (jQuery 1.3 supports bubbling for custom events).
-rw-r--r--ui/ui.core.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/ui.core.js b/ui/ui.core.js
index 283199f75..cbffa15ea 100644
--- a/ui/ui.core.js
+++ b/ui/ui.core.js
@@ -312,10 +312,14 @@ $.widget = function(name, prototype) {
this.element = $(element)
.bind('setData.' + name, function(event, key, value) {
- return self._setData(key, value);
+ if (event.target == element) {
+ return self._setData(key, value);
+ }
})
.bind('getData.' + name, function(event, key) {
- return self._getData(key);
+ if (event.target == element) {
+ return self._getData(key);
+ }
})
.bind('remove', function() {
return self.destroy();