Once the box clears, it doesn't autocomplete anymore

6 posts, 0 answers
  1. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 02 Oct 2011 Link to this post

    http://screencast.com/t/t90lodAfe

    See at about 20 seconds when remove the text in there and try to search for bread...just after that I reload the page and do it again, and it works.
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 07 Oct 2011 Link to this post

    Hello Steve,

     
    I have tried  to reproduce the depicted issue using this online demo, but to no avail. Maybe the problem is caused by different declaration of the autocomplete widget. Could you please provide a working example, which reproduces this issue?

    Best 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
  4. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 16 Oct 2011 Link to this post

    I think I've narrowed it down to this line

    var autocomplete = $("#food-box").data("kendoAutoComplete");
        autocomplete.popup.options.animation = { open: { show: true, effects: {} }, close: { hide: true, effects: {}} };

    So that was something provided to me to kill the autocomplete animation (which I don't want)...however when that line is there the animation container never seems to display:none, among other strange problems.

    http://www.screencast.com/t/DF4jCVIxvmRq

    Steve
  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 19 Oct 2011 Link to this post

    Hello Steve,

    Until we expose a better way to control animation of the popup when declare the autocomplete UI widget, you will need to override animation like this:

    autocomplete.popup.options.animation = {
                            open: {
                                show: true, effects: {}
                            },
                            close: {
                                hide: true,
                                effects: {},
                                complete: function() {
                                    var that = autocomplete.popup,
                                        options = that.options;
     
                                    that.wrapper.hide();
     
                                    var location = that.wrapper.data("location");
                                    if (location) {
                                        that.wrapper.css(location);
                                    }
     
                                    if (options.anchor != "body") {
                                        var direction = options.anchor.hasClass("k-state-border-down") ? "down" : "up";
                                        var dirClass = "k-state-border-" + direction;
     
                                        options.anchor
                                            .removeClass(dirClass)
                                            .children(".k-picker-wrap, .k-dropdown-wrap, .k-link")
                                            .removeClass("k-state-active")
                                            .removeClass(dirClass);
     
                                        that.element.removeClass("k-state-border" + "-" + kendo.directions[direction].reverse);
                                    }
     
                                    that._closing = false;
                                }
                            }
                        };

    Notice the complete callback.

    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!
  6. Rolando Rosales
    Rolando Rosales avatar
    3 posts
    Member since:
    Apr 2006

    Posted 02 Apr 2012 Link to this post

    Hi Georgi,
    not sure if this solved the original posters issue, but
    seems to fix the bug an issue where if the autocomplete is located at the bottom of the screen it will quickly open up and then close the DDL... having said that, it introduces a new bug where if the user manually searches for items from a button (and repeatedly presses the button), the DDL gets "stuck" and never opens again... i can still see calls going to the service but UI is "stuck"

    Thank you!

    Rolando
  7. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 03 Apr 2012 Link to this post

    Hello Rolando,

     
    This is not a known issue. Could you please check this jsFiddle demo and let me know if I am missing something?

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