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

IE 10 clear "X" not clearing selected value

1 Answer 236 Views
AutoComplete
This is a migrated thread and some comments may be shown as answers.
Brian Mains
Top achievements
Rank 1
Brian Mains asked on 16 Feb 2013, 02:32 AM
Hello,

I have this for my autocomplete:

<input id="MemberSelector" name="MemberSelector" type="text" class="MemberSelector" />

I setup the autocomplete and it works great.  Later on in my MVC view, I use this to grab the selected value:

var auto = $(f).find("input.MemberSelector").data("kendoAutoComplete");
var item = auto.ul.find(".k-state-selected > span");

It finds the correct values for the items with a selection.  However, an interesting side-effect; IE 10 puts a clearing "X" in the input when you type in text.  When you click on that X, the input is cleared, but it's retaining the value.  I've confirmed it is still retaining the selection of the item after you clear it.

Is that the correct behavior, and is there a work-around?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 19 Feb 2013, 08:15 AM
Hello Brian,

 
The "X" button of the IE browser only clears the input text and does not notify about this. In other words the "X" button behaves like:

  1. Select whole text
  2. Delete
  3. No event is raised for this

As you probably know, the widget will update its value on Blur/Enter/Tab. Depending on the above thoughts I am not aware of any feasible way to handle the "X" button.

As a side note the selection of the AutoComplete is not designed to be maintained after popup close (the current method will return 'null'). This is addressed and the fix will be available in the next internal build. If you need to get the value of the selected item use the select event.

Kind regards,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
AutoComplete
Asked by
Brian Mains
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or