开发者

Problem with using Ext.msg.alert on a popped Panel form

开发者 https://www.devze.com 2023-03-23 11:20 出处:网络
I\'m showing myFormPanel includes a form.I\'m opening this panel like : popUpPanel = new myFormPanel();

I'm showing myFormPanel includes a form.I'm opening this panel like :

popUpPanel = new myFormPanel();
popUpPanel.show();

I've put some validations for the form inside that panel and wanted to show such validation error message with Ext.Msg.alert('please enter X');

Problem is; when I pop this validation message with Ext.Msg.alert myFormP开发者_JAVA技巧anel is destroyed.

I think it is because my form and alert uses the same layer so Sencha destroys myFormPanel and shows alert message box.

How can I solve this issue? Is it possible to isolate myFormPanel popup layer and Ext.Msg.alert layer?

Any help will be appreciated.

Thank you.


I think this is a bug, but you can simply set hideOnMaskTap to false overcome this.

Working example: fiddle - toggle hideonMaskTap to see the effect.

By default, this config is true, and in documentation,

True to automatically bind a tap listener to the mask that hides the window. Defaults to true. Note: if you set this property to false you have to programmaticaly hide the overlay.

It seems like Msg.alert is causing some confusion here and FormPanel think you are clicking on the mask, and hence causes the panel to dismiss. Perhaps this is the quickest way to solve your problem for now.

0

精彩评论

暂无评论...
验证码 换一张
取 消