Why doesn't a simple click: function()… work in ExtJS?

前端 未结 5 1659
滥情空心
滥情空心 2021-01-14 05:12

When the user clicks on this element, I want it to show an alert.

However, when I click on the DIV that this Panel generates, nothing happens.

How ca

5条回答
  •  我在风中等你
    2021-01-14 05:39

    According to the API, click is not a valid event for Panels... However, you should still be able to add the click event to the underlying DIV element.

    Ext.fly(e.id).addListener('click', Ext.getCmp(e.id) , this);
    

提交回复
热议问题