Unplanned
Last Updated: 29 Sep 2021 17:46 by ADMIN
René
Created on: 24 Sep 2021 06:37
Category: Slider
Type: Bug Report
2
ValueChanged event of Slider is not always fired

When setting slider value by clicking on a position within slider the ValueChanged event does not always fire.  In those cases the slider looks as if set to the correct value but the connected Value is not updated. 

Unfortunately I could not find a reproducible pattern for this to happen.  Sometimes it occurs on the first or second click but sometimes it takes many clicks for the error to occur again.

The problem sometimes also occurs if setting the value not by clicking on a position but by dragging the slider.  In both cases (clicking on position and sliding) the GUI is updated before the ValueChanged event is fired.  The error does not seem to occur if using the left/right buttons for setting a value.  In this case the ValueChanged event is fired first and then the GUI is updated.

This error renders the Slider Component useless for us because the user can never be sure whether or not the value has been set correctly.

6 comments
ADMIN
Marin Bratanov
Posted on: 29 Sep 2021 17:46

Hello René,

Apologies for the missing link, here it is: https://github.com/telerik/blazor-ui/tree/master/common/popup-causes-scroll.

And thank you for the sample, I was able to reproduce this. It is, indeed, extremely random, it may not happen for over 30 "bashing" attempts (very quick clicks), then it might happen 2 times in 5 clicks. At this point, I do not know what is causing this, as it behaves the same for me inside the window, or outside of it, so I don't think the Window is related.

That said, I have logged this for further research and you will find your Telerik points updated as a small "thank you" for finding this.

Regards,
Marin Bratanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

René
Posted on: 29 Sep 2021 06:59

Hello Marin,

attached you will find a sample application which I used to reproduce the error:

Attached Files:
René
Posted on: 29 Sep 2021 06:10

Hello Marin,

thank you for the informationon using the "make public" checkbox.  I will stop using it so I will get quick responses.

Regarding the Slider problem:

The handler did not have any slow operation.  It just stored the value in a variable and if the value was > 0 it reset a string value bound to a TelerikMaskedTextBox.  Maybe its the interaction between slider and maskedTextBox that's causing the problem?

For your second suggestion "something goes wrong with the focus, perhaps something is off with the scrollable container (see more details on this type of issue here)" the link seems to be missing. It would be great if you could provide it.

If I find the time, I will try to create a minimal working example for reproducing the error.

ADMIN
Marin Bratanov
Posted on: 28 Sep 2021 18:30

Hello RenĂ© , 

When you select the "make public" checkbox at the end of the ticket submission process this directly results in a public page in the Feedback portal, and not in a ticket that has the response time from your license. We do try to monitor those new pages there, but we can't always get to them as fast as we can get to "regular" tickets. So, for time-sensitive issues (or cases when you have to share some private data such as proprietary code or screenshots with data) I recommend keeping the ticket private - it will then show up in your account and will have the response time from your license.

As for the issue you are facing - I am not aware of reasons for such behavior and my best guess is that either of these is happening:

  • there is a slow operation in the handler that causes something to go out of sync
  • something goes wrong with the focus, perhaps something is off with the scrollable container (see more details on this type of issue here)

If you can reproduce this issue with a sample similar to the one below, that would be quite helpful because in my tests I was not able to see an issue (I must have clicked around the slider dozens of times):

 

@TheValue

<TelerikWindow Visible="true" Width="600px" Height="300px">
    <WindowContent>

            <TelerikSlider Value="@TheValue" ValueChanged="@( (int v) => ValueChangedHandler(v))"
                           SmallStep="10" LargeStep="20" Min="0" Max="100" Width="500px">
            </TelerikSlider>
        
    </WindowContent>
    <WindowTitle>The window</WindowTitle>
</TelerikWindow>
@code{
    int TheValue { get; set; } = 30;

    async Task ValueChangedHandler(int v)
    {
        // update the view-model to let the change render
        // if you avoid that, you wil effectively cancel the event
        TheValue = v;

        Console.WriteLine($"The user has now chosen {v}");
    }
}

 

Regards,
Marin Bratanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

René
Posted on: 28 Sep 2021 13:58

Anybody home ???  I opened this as a ticket in our user account and we are supposed to get an answer within 24h !

I had to replace the slider by a radio group so my users can at least go back to work.  I still would like to get some Feedback regarding the slider.

René
Posted on: 24 Sep 2021 06:40
I don't know if it makes a difference but the sliders are placed in a TelerikWindowComponent and there are several sliders within that component.