View Full Version : How to handle a Ext.Img onClick event?
marcoals
29 Dec 2011, 4:58 PM
Please, I need to handle a Ext.Img onClick event. Is there a way to do it since the Img component doesn't have this event?
Thanks!
skirtle
29 Dec 2011, 6:47 PM
You need to add the listener to the underlying element. Click and contextmenu events aren't exposed on components unless they add value to the event fired by the element.
listeners: {
el: {
click: function() {
...
}
}
}
or:
img.getEl().on('click', function() {
...
});
marcoals
30 Dec 2011, 3:16 AM
Thank you very much! It worked!
Powered by vBulletin® Version 4.2.3 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.