This is a migrated thread and some comments may be shown as answers.

AutoCompleteBox : Caret persistent after clicking on the delete button

2 Answers 115 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Emmanuel
Top achievements
Rank 1
Emmanuel asked on 16 Oct 2014, 08:34 AM
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 Answers, 1 is accepted

Sort by
0
Emmanuel
Top achievements
Rank 1
answered on 16 Oct 2014, 09:46 AM
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();
        }
    }
}
0
Nasko
Telerik team
answered on 16 Oct 2014, 10:43 AM
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.

 
Tags
AutoCompleteBox
Asked by
Emmanuel
Top achievements
Rank 1
Answers by
Emmanuel
Top achievements
Rank 1
Nasko
Telerik team
Share this question
or