@danielgindi/selectbox 2.0.55 → 2.0.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lib.es6.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @danielgindi/selectbox 2.0.55
2
+ * @danielgindi/selectbox 2.0.56
3
3
  * git://github.com/danielgindi/selectbox.git
4
4
  */
5
5
  import { closestUntil, createElement, next, prev, setElementAttrs } from "@danielgindi/dom-utils/lib/Dom";
@@ -2188,8 +2188,8 @@ var DropList = class DropList {
2188
2188
  let newOuterWidth = Math.max(autoWidth, targetWidth);
2189
2189
  setElementWidth(el, newOuterWidth, true, true);
2190
2190
  const elComputedStyle = getComputedStyle(el);
2191
- let bordersWidth = (parseFloat(elComputedStyle.borderLeftWidth) || 0) + (parseFloat(elComputedStyle.borderRightWidth) || 0);
2192
- let scrollWidth = el.scrollWidth + bordersWidth;
2191
+ let extraElWidth = (parseFloat(elComputedStyle.borderLeftWidth) || 0) + (parseFloat(elComputedStyle.borderRightWidth) || 0) + (parseFloat(elComputedStyle.paddingLeft) || 0) + (parseFloat(elComputedStyle.paddingRight) || 0);
2192
+ let scrollWidth = el.scrollWidth + extraElWidth;
2193
2193
  if (scrollWidth > newOuterWidth) {
2194
2194
  let delta = scrollWidth - newOuterWidth;
2195
2195
  el.style.width = `${parseFloat(el.style.width) + delta}px`;