@danielgindi/selectbox 1.0.143 → 1.0.144

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.umd.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @danielgindi/selectbox 1.0.143
2
+ * @danielgindi/selectbox 1.0.144
3
3
  * git://github.com/danielgindi/selectbox.git
4
4
  */
5
5
  (function (global, factory) {
@@ -2340,6 +2340,28 @@
2340
2340
 
2341
2341
  if (p.estimateWidth || p.virtualListHelper.isVirtual()) {
2342
2342
  p.virtualListHelper.createGhostItemElement(GhostSymbol, true, (itemEl) => {
2343
+ let measureScroll = Dom.createElement('span', {
2344
+ css: {
2345
+ display: 'block',
2346
+ width: '100px',
2347
+ height: '100px',
2348
+ overflow: 'scroll',
2349
+ position: 'absolute'
2350
+ }
2351
+ });
2352
+ let measureScrollParent = Dom.createElement('span', {
2353
+ css: {
2354
+ display: 'block',
2355
+ position: 'relative',
2356
+ width: '0',
2357
+ height: '0',
2358
+ overflow: 'hidden'
2359
+ }
2360
+ }, [measureScroll]);
2361
+ itemEl.appendChild(measureScrollParent);
2362
+ let vertScrollBarWidth = measureScroll.offsetWidth - measureScroll.clientWidth;
2363
+ itemEl.removeChild(measureScrollParent);
2364
+
2343
2365
  p.lastMeasureItemWidth = Css.getElementWidth(itemEl, true, true);
2344
2366
  });
2345
2367
  }