From d7d49b4d4ced430b8735c77008fd0f793ef91e69 Mon Sep 17 00:00:00 2001 From: Chris Jackson Date: Sat, 26 Mar 2016 13:08:29 +0000 Subject: [PATCH] Fix width calculation to allow for different padding Signed-off-by: Chris Jackson --- src/uiSelectController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uiSelectController.js b/src/uiSelectController.js index ba3e6d56d..77cc4be2e 100644 --- a/src/uiSelectController.js +++ b/src/uiSelectController.js @@ -442,7 +442,7 @@ uis.controller('uiSelectCtrl', if (containerWidth === 0) { return false; } - var inputWidth = containerWidth - input.offsetLeft - 10; + var inputWidth = containerWidth - input.offsetLeft - ctrl.searchInput.parent()[0].offsetLeft - 5;; if (inputWidth < 50) inputWidth = containerWidth; ctrl.searchInput.css('width', inputWidth+'px'); return true;