@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.cjs.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
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
@@ -2217,8 +2217,8 @@ var DropList = class DropList {
2217
2217
  let newOuterWidth = Math.max(autoWidth, targetWidth);
2218
2218
  (0, _danielgindi_dom_utils_lib_Css.setElementWidth)(el, newOuterWidth, true, true);
2219
2219
  const elComputedStyle = getComputedStyle(el);
2220
- let bordersWidth = (parseFloat(elComputedStyle.borderLeftWidth) || 0) + (parseFloat(elComputedStyle.borderRightWidth) || 0);
2221
- let scrollWidth = el.scrollWidth + bordersWidth;
2220
+ let extraElWidth = (parseFloat(elComputedStyle.borderLeftWidth) || 0) + (parseFloat(elComputedStyle.borderRightWidth) || 0) + (parseFloat(elComputedStyle.paddingLeft) || 0) + (parseFloat(elComputedStyle.paddingRight) || 0);
2221
+ let scrollWidth = el.scrollWidth + extraElWidth;
2222
2222
  if (scrollWidth > newOuterWidth) {
2223
2223
  let delta = scrollWidth - newOuterWidth;
2224
2224
  el.style.width = `${parseFloat(el.style.width) + delta}px`;