You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 2, 2019. It is now read-only.
Bug description:
After resizing a browser's window, control's width become longer.
Sometimes it's just +20 px and sometimes it's +500px
Link to minimally-working plunker that reproduces the issue:
Simply https://angular-ui.github.io/ui-select/demo-bootstrap.html
Version of Angular, UI-Select, and Bootstrap/Select2/Selectize CSS
Your own demo. Tested on google chrome and firefox.
FIX?
Find that code in select.js (lines: ~815-829)
var input = ctrl.searchInput[0], container = ctrl.searchInput.parent().parent()[0], calculateContainerWidth = function() { // Return the container width only if the search input is visible return container.clientWidth * !!input.offsetParent; }, updateIfVisible = function(containerWidth) { if (containerWidth === 0) { return false; } var inputWidth = containerWidth - input.offsetLeft - 10; if (inputWidth < 50) inputWidth = containerWidth; ctrl.searchInput.css('width', inputWidth+'px'); return true; };
Change
ctrl.searchInput.css('width', inputWidth+'px');
into
ctrl.searchInput.css('width', '100%');
Profit
The text was updated successfully, but these errors were encountered: