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

Once the box clears, it doesn't autocomplete anymore

5 Answers 110 Views
AutoComplete
This is a migrated thread and some comments may be shown as answers.
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
sitefinitysteve asked on 03 Oct 2011, 01:10 AM
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.

5 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 07 Oct 2011, 09:55 AM
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!
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 16 Oct 2011, 07:42 PM
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
0
Georgi Krustev
Telerik team
answered on 19 Oct 2011, 10:05 AM
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!
0
Rolando Rosales
Top achievements
Rank 1
answered on 02 Apr 2012, 08:40 PM
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
0
Georgi Krustev
Telerik team
answered on 03 Apr 2012, 05:12 PM
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!
Tags
AutoComplete
Asked by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Answers by
Georgi Krustev
Telerik team
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Rolando Rosales
Top achievements
Rank 1
Share this question
or