Try to make the input box fill the line better when we hide the trigger button

This commit is contained in:
Nathan Gray 2016-04-12 20:58:21 +00:00
parent 467421a0c7
commit 95e1cd00ff

View File

@ -1083,10 +1083,11 @@
ms._valueContainer.appendTo(ms.selectionContainer);
if(cfg.selectionPosition === 'inner' && !cfg.selectionContainer && ms.container.is(':visible')) {
var inputPadding = ms.input.outerWidth(true) - ms.input.width();
ms.input.width(0);
inputOffset = ms.input.offset().left - ms.selectionContainer.offset().left;
w = ms.container.width() - inputOffset - 42;
ms.input.width(w);
inputOffset = ms.input.offset().left - ms.selectionContainer.offset().left;
w = ms.container.width() - inputOffset - (cfg.hideTrigger ? inputPadding : 42);
ms.input.width(w);
}
if(_selection.length === cfg.maxSelection){