Aug 08, 2014, 10:35 AM
[CLOSED] Unexpected behaviour of EventMask and FormBind="true"
Hi,
Scenario: One button, when clicked mask whole window/form disallowing user to click that button again until event is finished.
If your button have FormBind="true" you can use "Enter" key to trigger Click event on your form.
My issue is that "Enter" key is still working when window/form is masked.
Holding "Enter" key triggers Click event all the time and new EventMasks are created on top of already created one.
My solution is to disable the button using Click Listener and enable when event is completed:
Matt,
Scenario: One button, when clicked mask whole window/form disallowing user to click that button again until event is finished.
If your button have FormBind="true" you can use "Enter" key to trigger Click event on your form.
My issue is that "Enter" key is still working when window/form is masked.
Holding "Enter" key triggers Click event all the time and new EventMasks are created on top of already created one.
My solution is to disable the button using Click Listener and enable when event is completed:
<Buttons>
<ext:Button
runat="server"
ID="btnLogin"
Text="Login"
FormBind="true">
<Listeners>
<Click Handler="item.disable()" />
</Listeners>
<DirectEvents>
<Click OnEvent="LoginClick" Complete="item.enable()">
<EventMask
ShowMask="true"
Msg="Please wait..." />
</Click>
</DirectEvents>
</ext:Button>
</Buttons>
Hope that will help to avoid that unexpected behaviour. Matt,
Last edited by Daniil; Aug 12, 2014 at 3:55 PM.
Reason: [CLOSED]