svelte-range-slider-pips: [bug] Svelte 5 Range handles are not moving when dragged.

Describe the bug The slider handles are not moving even tho the value is being read and the handler recognizes the value EDIT: It looks like this is, in general, an issue with bind: values = {...} and it is not limited to range property. As soon as you bind the values the slider handles will stop moving. To Reproduce

Steps to reproduce the behavior:

  1. npmi svelte-range-slider-pips components into svelte 5 project
let {min, max} = $props();
// old export let min

let values = $state([0, 8]);
// old $: values = [0,8]
<RangeSlider
		float
		range
		pips
		hoverable
		{id}
		{min}
		{max}
		all="label"
		bind:values
		on:stop={someHandler} />
  1. Run in Vite

Screenshots As seen from the picture below, even tho the handle was moved and the value was read, the actual handle element stayed in place.

Screenshot 2024-01-24 at 19 59 39 Screenshot 2024-01-24 at 20 00 37

Device/Environtment

Svelte 5 with typescript and sveltekit 2

Additional context I have noticed that this component is on svelte 3.0.0. It would be great to create an alpha version of svelte-range-slider-pips that is accommodating the new runes system. If not, it should be crosscompatible with at least Svelte 4.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 17 (10 by maintainers)

Commits related to this issue

Most upvoted comments

The problem is on Svelte’s side. The problem is the combination of passing in $state (which is fine-grained, compared to the old let which is not) in combination with the transformation of $: which only checks that the property as a whole, not its properties, have changed, in order to rerun. https://github.com/sveltejs/svelte/pull/10543 will fix this.

I’ve installed the beta version, unfortunately, the issue with handles moving is persisting on Svelte 5 with Sveltekit 2

It looks like the value is updated but the nub is not moving still…