AutoCompleteBox : Caret persistent after clicking on the delete button

3 posts, 0 answers
  1. Emmanuel
    Emmanuel avatar
    8 posts
    Member since:
    Sep 2013

    Posted 16 Oct 2014 Link to this post

    Hello,

    My issue is visible in the last telerik WPF demo, in the sample called "AutoCompleteBox : Multiselection with autocompletebox".

    After adding some box in the control, I remove one with the "cross button", everything works fine, but when I move my cursor outside of the control, the caret get stuck, and I need to click in order to have my normal pointer back.


    Do you have any ideas how to solve this behavior ?

    Regards, 
  2. Emmanuel
    Emmanuel avatar
    8 posts
    Member since:
    Sep 2013

    Posted 16 Oct 2014 in reply to Emmanuel Link to this post

    EDIT:

    I received an answer from the support : 

    One possible workaround I could suggest you is to release the mouse capture when an item is deselected. For that purpose you could handle the SelectionChanged event and to call the ReleaseMouseCapture method:

    private void radAutoCompleteBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {
        if (e.RemovedItems.Count > 0)
        {
            if (Mouse.Captured is RadAutoCompleteBox)
            {
                (sender as RadAutoCompleteBox).ReleaseMouseCapture();
            }
        }
    }
  3. Nasko
    Admin
    Nasko avatar
    622 posts

    Posted 16 Oct 2014 Link to this post

    Hi Mark,

    Thank you for sharing the workaround, we suggested, with the community. Also for a convenience I have updated the Feedback item in order to include the workaround.

    If you have any other questions, let us know.

    Regards,
    Nasko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top