Fix allowFreeEntry taglist does not get rendered after focus out from input field

This commit is contained in:
Hadi Nategh 2017-09-11 11:57:55 +02:00
parent 27fab7c259
commit 35f2f3fcf1

View File

@ -356,8 +356,13 @@ var et2_taglist = (function(){ "use strict"; return et2_selectbox.extend([et2_IR
if(document.activeElement === document.body || if(document.activeElement === document.body ||
widget.div.has(document.activeElement).length > 0) widget.div.has(document.activeElement).length > 0)
{ {
if (widget.options.allowFreeEntries) taglist.container.blur();
taglist.input.focus(); taglist.input.focus();
} }
else if (widget.options.allowFreeEntries)
{
taglist.container.blur();
}
});},100 });},100
); );
this.$taglist.one('collapse', function() { this.$taglist.one('collapse', function() {
@ -408,7 +413,7 @@ var et2_taglist = (function(){ "use strict"; return et2_selectbox.extend([et2_IR
// multiple on the page // multiple on the page
this.div.on('blur', 'input', function() { this.div.on('blur', 'input', function() {
jQuery('.ms-ctn-focus', widget.div).removeClass('ms-ctn-focus'); jQuery('.ms-ctn-focus', widget.div).removeClass('ms-ctn-focus');
}) });
return true; return true;
}, },