preactjs / preactjs/preact

[preact/compat] radix-ui Slider component drag points (Thumbs) not working

Open
#3,666 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

compat
Dominant language
JavaScript
Stars
38.9k
Forks
2.4k
Avg merge
20h 18m
Merged PRs (30d)
35

Description

  • Check if updating to the latest Preact version resolves the issue

Describe the bug
Thumb (drag points) are not receiving any updates past the initial css applied.

To Reproduce

https://stackblitz.com/edit/nextjs-preact-webpack5-pjoxwh

Steps to reproduce the behaviour:

Load the stackblitz example above and drag the edges of the white lines:

Screen Shot 2022-08-08 at 12 43 56 pm

While the line itself is adjustable, the Thumb components are not shown. If the nested span's css is modified from display: none to display: block the Thumb element is rendered on left edge with 0, 0 coords.

Screen Shot 2022-08-08 at 12 49 37 pm

Expected behavior

For slider thumbs to be attached to end of white line and to move along with them.

Screen Shot 2022-08-08 at 12 54 02 pm

Additional context

Slider component used to hang the app as did the Dialog in this bug report https://github.com/preactjs/preact/issues/3297. Since version 10.10.1 and this https://github.com/preactjs/preact/pull/3645 fix specifically the Slider component now no longer hangs the app but it's not 100% working either with Thumb component being broken.

Same Issue reported in radix-ui repo https://github.com/radix-ui/primitives/issues/1601

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked StackBlitz reproduction and compare the Radix UI Slider and Thumb behavior under preact/compat. Inspect how the slider’s white-line position reaches its Thumb elements, then verify that the thumbs render at the line endpoints and move during dragging without breaking the existing slider behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.