From 1023522f469f165d7af9d57cb8e2299489b26949 Mon Sep 17 00:00:00 2001 From: Christopher Lenz Date: Mon, 9 Mar 2015 14:36:05 +0100 Subject: [PATCH] Fix for regression caused by #718. The search input size was being calculated incorrectly for non-multiple select instances using the Bootstrap theme. Remedy by only calling the sizing function when the select is in multi mode, which is how this function is guarded on other call sites as well. --- src/uiSelectDirective.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/uiSelectDirective.js b/src/uiSelectDirective.js index 8bd5369bf..00fe1aa28 100644 --- a/src/uiSelectDirective.js +++ b/src/uiSelectDirective.js @@ -211,8 +211,10 @@ uis.directive('uiSelect', attrs.$observe('disabled', function() { // No need to use $eval() (thanks to ng-disabled) since we already get a boolean instead of a string $select.disabled = attrs.disabled !== undefined ? attrs.disabled : false; - // As the search input field may now become visible, it may be necessary to recompute its size - $select.sizeSearchInput(); + if ($select.multiple) { + // As the search input field may now become visible, it may be necessary to recompute its size + $select.sizeSearchInput(); + } }); attrs.$observe('resetSearchInput', function() {