Skip to content

Commit 73bdd88

Browse files
author
Simon Neidhold
committed
another quick-fix for angular-ui#1980 and angular-ui#2010 -- input width for "multiple" control (missing a valid sourcemap because of wrecked build environment)
1 parent 66a43ae commit 73bdd88

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dist/select.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -830,13 +830,13 @@ uis.controller('uiSelectCtrl',
830830
container = ctrl.$element[0],
831831
calculateContainerWidth = function() {
832832
// Return the container width only if the search input is visible
833-
return container.clientWidth * !!input.offsetParent;
833+
return $(container).width() * !!input.offsetParent
834834
},
835835
updateIfVisible = function(containerWidth) {
836836
if (containerWidth === 0) {
837837
return false;
838838
}
839-
var inputWidth = containerWidth - input.offsetLeft - (ctrl.multiple ? 10 : 0);
839+
var inputWidth = containerWidth - input.offsetLeft;
840840
if (inputWidth < 50) inputWidth = containerWidth;
841841
ctrl.searchInput.css('width', inputWidth+'px');
842842
return true;

src/uiSelectController.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,13 +528,13 @@ uis.controller('uiSelectCtrl',
528528
container = ctrl.$element[0],
529529
calculateContainerWidth = function() {
530530
// Return the container width only if the search input is visible
531-
return container.clientWidth * !!input.offsetParent;
531+
return $(container).width() * !!input.offsetParent;
532532
},
533533
updateIfVisible = function(containerWidth) {
534534
if (containerWidth === 0) {
535535
return false;
536536
}
537-
var inputWidth = containerWidth - input.offsetLeft - (ctrl.multiple ? 10 : 0);
537+
var inputWidth = containerWidth - input.offsetLeft;
538538
if (inputWidth < 50) inputWidth = containerWidth;
539539
ctrl.searchInput.css('width', inputWidth+'px');
540540
return true;

0 commit comments

Comments
 (0)