IE 10 clear "X" not clearing selected value

2 posts, 0 answers
  1. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 15 Feb 2013 Link to this post

    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.
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 19 Feb 2013 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
Back to Top