jquery - Remove whitespace and line break from autocomplete's li element -


when focused on auto sugggestion has line break in it's renders whitespaces in input. in suggestion select shows fine.

any solution? tried white-space: nowrap both on input , on li element , tried running function remove li whitespaces using replace(/<br\s?\/?>/, '')

this how looks in console:

and how input , suggestion looks like:

this autocomplete code i've written:

$(function() {        $( "#searchpagequery" ).autocomplete({      source: getsuggestionssearchpage,      autofocus: false,      minlength: 2,      select: function ( event, ui ) {        window.location = ui.item.url;        }    });  });      function getsuggestionssearchpage ( request, response ) {    var params = $("input:checked[name='labels']").serializearray();    var query = { name:"q", value:request.term };    params.push( query )    var params1 = jquery.param( params );    $.ajax({    datatype: "json",    url: "@{autocompletesearchr}",    data: params1,    success: function(data) {      var newdata = data.suggestions;      response(newdata);      }    });    }


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -