angularjs-dropdown-multiselect
angularjs-dropdown-multiselect copied to clipboard
Truncate the button text correctly when the parent has padding
The calculation that truncates the button text to fit the available space (in function getButtonText) assumes that the whole offsetWidth of the parent element is available for the button. But the padding and border is not available for the button (reference: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetWidth), which can lead to the button overflowing.