From b8dc9d5bc96d4f072e942d6110a8268c330ee9b5 Mon Sep 17 00:00:00 2001 From: Marko Rabasovic Date: Tue, 4 Nov 2014 10:55:14 +0100 Subject: [PATCH] The input become invisible when the row is filled In case the selected items fill up the whole first row, the resulting width becomes negative. --- magicsuggest.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/magicsuggest.js b/magicsuggest.js index 3ff463d..b121541 100644 --- a/magicsuggest.js +++ b/magicsuggest.js @@ -1073,6 +1073,9 @@ ms.input.width(0); inputOffset = ms.input.offset().left - ms.selectionContainer.offset().left; w = ms.container.width() - inputOffset - 42; + if(w < 0) { + w = ms.container.width(); + } ms.input.width(w); }