#144·swapy

data-swapy-handle misbehaves when manualSwap is enabled in Svelte

Author: noboikeCreated Aug 11, 2025Updated Dec 12, 2025

When using manualSwap in Svelte, the data-swapy-handle doesn't work properly unless I manually call swapy.update() after the swap ends.

Example:

javascript
swapy.onSwapEnd(() => {
  swapy?.update();
});

With this, the handle works as expected. However, there's a new problem:

  • If I resize the window and the slot expands to full width, its width freezes and does not adjust dynamically.

Expected behavior:

The handle should work with manualSwap without requiring a manual swapy.update(), and resizing the window should still allow elements to adjust their width.