@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/lib/DropList.js CHANGED
@@ -3392,8 +3392,11 @@ class DropList {
3392
3392
  setElementWidth(el, newOuterWidth, true, true);
3393
3393
 
3394
3394
  const elComputedStyle = getComputedStyle(el);
3395
- let bordersWidth = (parseFloat(elComputedStyle.borderLeftWidth) || 0) + (parseFloat(elComputedStyle.borderRightWidth) || 0);
3396
- let scrollWidth = el.scrollWidth + bordersWidth;
3395
+ let extraElWidth = (parseFloat(elComputedStyle.borderLeftWidth) || 0) +
3396
+ (parseFloat(elComputedStyle.borderRightWidth) || 0)+
3397
+ (parseFloat(elComputedStyle.paddingLeft) || 0)+
3398
+ (parseFloat(elComputedStyle.paddingRight) || 0);
3399
+ let scrollWidth = el.scrollWidth + extraElWidth;
3397
3400
  if (scrollWidth > newOuterWidth) {
3398
3401
  // consider scrollWidth delta
3399
3402
  let delta = scrollWidth - newOuterWidth;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danielgindi/selectbox",
3
- "version": "2.0.55",
3
+ "version": "2.0.56",
4
4
  "description": "A collection of dom utilities. So you can work natively with the dom without dom frameworks.",
5
5
  "main": "dist/lib.cjs.min.js",
6
6
  "module": "lib/index.js",