Button.Click is too aggressive

Please post public support tickets here. Note: for private support tickets, please send an email to support@cshtml5.com instead.
TaterJuice
Posts: 99
Joined: Thu Mar 16, 2017 5:40 am
Contact:

Button.Click is too aggressive

Postby TaterJuice » Thu Oct 26, 2017 5:37 pm

I need help figuring something out, I've been unable to solve on my own.

The Button.Click event fires too quickly, or out of order, I think.

1. If you're focused on a Textbox or Passwordbox, then click a button, it can invoke the button delegate and the textbox never loses focus, so it never updates it's bindings.

2. Some users can double-click it quickly and invoke 2 commands before the first delegate can disable the CanExecute value, or an eventhandler can disable the button.

I've worked around these issues temporarily, by code-behind.

1.

Code: Select all

App.Current.RootElement.BeginInvoke(async () => {
    await Task.Delay(300);
    FindFocusableUsercontrol().Focus();
    await Task.Delay(300);
    await InvokeReal(sender, _param);
}


This fixes the focus/binding issue, but STILL double-clicks get through. Now I have to:

2.

Code: Select all

async Task InvokeReal(object sender, object _param) {
    Button _realBtn = ((Button)sender);
    lock(_clkLock){
        If (IsInvokeEnabled(_realBtn)) {
            DisableButtonInvoke(_realBtn);
            LockedInvokeRealButton(_realBtn, _param);
            }
    }
    await Task.Delay(500);
    EnableInvokedButton(_realBtn);
}


This is all just a bit silly, and slows down my users' experience enormously.

I've tried using

Button.Command
Button.Tapped
Button.Click

I've had some success using the new ClickMode=Release, but now I can't intercept the Mouse DOWN this way.

Any help would be appreciated.

JS-Support @Userware
Site Admin
Posts: 894
Joined: Tue Apr 08, 2014 3:42 pm

Re: Button.Click is too aggressive

Postby JS-Support @Userware » Thu Nov 02, 2017 1:10 am

Hi,

Thanks for reporting this defect.

We are going to investigate it and fix it right away.

Regards,
JS-Support

JS-Support @Userware
Site Admin
Posts: 894
Joined: Tue Apr 08, 2014 3:42 pm

Re: Button.Click is too aggressive

Postby JS-Support @Userware » Mon Dec 11, 2017 12:48 am

Hi,

We improved the order of the events of the Button control in a recent build.

Please feel free to let us know if you still encounter issues related to this topic.

Thanks a lot.
Regards,
JS-Support


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 3 guests