mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Widget Factory: Check the target in getData and setData events (jQuery 1.3 supports bubbling for custom events).
This commit is contained in:
parent
74f061c716
commit
30e4470a2c
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user