[RESOLVED] Problem layout and navbar gap with expandable search with autocomplete ajax


Im have a problem when click on expandable navbar search, some times break layout
Can reproduce on chrome and on android 9


Im using on expand search with autocomplete…

Возьмите за основу работоспособный kitchen, затем постепенно добавляйте ваш код. Таким образом вы сможете найти проблему.

im using this for navbar

I have to change input type from search to text and for autocomplete show have to remove class navbar-inner-large-collapsed

i think this layout crash is becouse or when happen is when i click on search and keyboard open …after close search <-- with text on input
i like to use this but doing this i have to work other way… can any one help me out ?

<div class="navbar">
                    <div id="hackbar" class="navbar-inner navbar-inner-large">
                        <div class="left">
                            <a href="#" class="link icon-only panel-open" data-panel="left">
                                <i class="icon f7-icons if-not-md">menu</i>
                                <i class="icon material-icons md-only">menu</i>
                        <div class="title sliding" >Framework 7</div>
                        <div class="right">
                            <a class="link icon-only searchbar-enable" data-searchbar=".searchbar-components">
                                <i class="icon f7-icons if-not-md">search</i>
                                <i class="icon material-icons md-only">search</i>
                        <div class="title-large">
                            <div class="title-large-text">Framework 7</div>
                            class="searchbar searchbar-expandable searchbar-components searchbar-init" >
                            <div class="searchbar-inner">
                                <div class="searchbar-input-wrap">
                                    <input type="text" placeholder="search" id="autocomplete-dropdown-ajax"/>
                                    <i class="searchbar-icon"></i>
                                    <span class="input-clear-button"></span>
                                <span class="searchbar-disable-button if-not-aurora">Cancel</span>

then on js side

var autocompleteDropdownAjax = app.autocomplete.create({
inputEl: ‘#autocomplete-dropdown-ajax’,
openIn: ‘dropdown’,
//expandInput: true, // expand input
//preloader: true, //enable preloader
/* If we set valueProperty to “id” then input value on select will be set according to this property */
valueProperty: ‘codigo’, //object’s “value” property name
textProperty: ‘codigo’, //object’s “text” property name
limit: 50, //limit to 20 results
on: {
open: function () {
console.log(‘autocomplete open’);
var element = document.getElementById(“hackbar”);

close: function () {

  console.log("go is close")


dropdownPlaceholderText: ‘Search …’,
source: function (query, render) {
var autocomplete = this;
var results = [];
if (query.length === 0) {
// Show Preloader

// Do Ajax request to Autocomplete data
  url: 'http://***/search.php',
  method: 'GET',
  dataType: 'json',
  //send "query" to server. Useful in case you generate response dynamically
  data: {
    query: query,
  success: function (data) {
    // Find matched items
    for (var i = 0; i < data.length; i++) {
      if (data[i].codigo.toLowerCase().indexOf(query.toLowerCase()) >= 0) results.push(data[i]);
    // Hide Preoloader
    // Render items by passing array with result items


Found the problem that break navbar …after close the expandable search the input stay with the class “input-focused” so when click on icon search open the keyboard and navbar show a mess but if i remove the class
$$( “#autocomplete-dropdown-ajax” ).removeClass( “input-focused” );
work fine