Skip to content

Commit 3cf11b5

Browse files
author
Aurélien Lambert
committed
fix multiple input width (issue angular-ui#1980)
1 parent 912a70a commit 3cf11b5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: src/uiSelectController.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -534,9 +534,11 @@ uis.controller('uiSelectCtrl',
534534
if (containerWidth === 0) {
535535
return false;
536536
}
537-
var inputWidth = containerWidth - input.offsetLeft;
538-
if (inputWidth < 50) inputWidth = containerWidth;
539-
ctrl.searchInput.css('width', inputWidth+'px');
537+
setTimeout(function(){
538+
var inputWidth = containerWidth - input.offsetLeft -10;
539+
if (inputWidth < 50) inputWidth = containerWidth;
540+
ctrl.searchInput.css('width', inputWidth+'px');
541+
}, 0);
540542
return true;
541543
};
542544

0 commit comments

Comments
 (0)