Fomantic-ui: [dropdown] input focus out when `minCharacters` more than one char in api mode

Created on 11 Oct 2019  路  2Comments  路  Source: fomantic/Fomantic-UI

hi
focus out of input when minCharacters more than one char in api mode.

step by step
inject below js code in home page of Fomantic-UI

var myModal = $(
'<div class="ui modal">\
  <i class="close icon">\</i>\
  <div class="header">\
    Modal Title\
  </div>\
  <div class="content">\
    <div class="ui search selection dropdown">\
      <input type="hidden" name="gender">\
      <i class="dropdown icon">\</i>\
      <div class="default text">\Gender</div>\
      <div class="menu">\
      </div>\
    </div>\
  </div>\
  <div class="actions">\
    <div class="ui button">\Cancel</div>\
    <div class="ui button">\OK</div>\
  </div>\
</div>'
);

myModal.modal({
    onVisible : function(){
        $('.ui.dropdown',this).dropdown({
            minCharacters : 3,
            apiSettings: {
              // this url parses query server side and returns filtered results
              url: '//api.semantic-ui.com/tags/{query}',
            },
        });

    }
}).modal('show');

after code injected , modal opens.
then search abc in dropdown and you see No results found..
now press CTRL + A (select all) and type only a character , finally focus out occur

Version

2.7.8

lanjavascript typbug

All 2 comments

Confirmed,I made a jsfiddle testcase. It does not even have to be a modal and it also happens, when you just try to press backspace.
http://jsfiddle.net/s4p0henv/

backspace_vanish

Fixed by #1095

Was this page helpful?
0 / 5 - 0 ratings