| Page 1 of 1 | [ 2 posts ] |
|
Hi everyone!
I stumbled upon a strange behaviour. YUI pros, tell me whether this OK or I am doing something wrong. I have a widget with a bunch of attributes. Some of them have the 'broadcast' property set to '1'. The problem is, when I set a global listener to the broadcasted attribute, this listener is unable to prevent the attribute from being set. All it can do is to prevent the 'afterChange' listeners. Here is the test code: http://jsbin.com/oqehi5/edit (turn on your console). As you can see, when the listener calls e.preventDefault(), the attribute is already set. So, is there a way to fix it? |
|
The broadcast system is separate from the bubbling system. If you configure your objects to bubble to Y via myObject.addTarget(Y); then you can prevent the events. Broadcasted events aren't preventable.
|
| Page 1 of 1 | [ 2 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group