HTML Body Tag gets style display:none if autosuggest is turned off

2 posts, 0 answers
  1. haider
    haider avatar
    1 posts
    Member since:
    Apr 2015

    Posted 24 Apr 2015 Link to this post

    I am getting strange behavior when I turned off the autosuggest programmatically. 

    The scenario is that I have a  KendoAutoComplete input box along with search button. The search result come from both typing characters and pressing the search button. The requirement is that autosuggest should work when user has type at least 3 characters in the input, but the search button should open autosuggest even if one character is typed.


    In order to do that I used the following code below: 

    var turnOffAutoComplete = function () {
            autocomplete.options.suggest = false;
            autocomplete.bind("open", function (e) {

        var turnOnAutoComplete = function () {
            autocomplete.options.suggest = true;        


    $("#input_text").keyup(function () {       
            if ($(this).val().length >= 3) {
            else {

    $("#search-button").click(function () {
            var val = $('#input_text').val();        


    The code above is causing the screen to becomes blank when user clicks anywhere on the screen after typing one character (autosuggest data is being fetchedfor first time). I checked in console, and saw <body> having style "display:none". 

    Anyone knows why this would be happening? Need help asap. 


  2. Alexander Popov
    Alexander Popov avatar
    1411 posts

    Posted 28 Apr 2015 Link to this post

    Hello haider,

    I am not exactly sure how to reproduce this scenario, however I would suggest a slightly different approach. For example, changing the options should be done using the setOptions method. Also, you can programmatically open the popup through the suggest method. In case that does not helps I would ask you to share a Dojo example where this behavior is observed - that would allow us to investigate further.

    Alexander Popov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top