@smilodon/core 1.0.7 → 1.0.8

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/index.js CHANGED
@@ -1557,8 +1557,13 @@ class EnhancedSelect extends HTMLElement {
1557
1557
  this._config.callbacks.onOpen?.();
1558
1558
  // Scroll to selected if configured
1559
1559
  if (this._config.scrollToSelected.enabled) {
1560
- // Use setTimeout to allow render to complete
1561
- setTimeout(() => this._scrollToSelected(), 0);
1560
+ // Use requestAnimationFrame for better timing after render
1561
+ requestAnimationFrame(() => {
1562
+ // Double RAF to ensure layout is complete
1563
+ requestAnimationFrame(() => {
1564
+ this._scrollToSelected();
1565
+ });
1566
+ });
1562
1567
  }
1563
1568
  }
1564
1569
  _handleClose() {