PDA

View Full Version : [CLOSED] Unexpected behaviour of EventMask and FormBind="true"



matt
Aug 08, 2014, 11:35 AM
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:


<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,

Daniil
Aug 08, 2014, 4:28 PM
Hi @matt,

Yes, masking doesn't prevent the behavior on Enter press. I think your solution is good enough.