Skip to content

Slider Thumb primitives not working in Preact #1601

@nikuda

Description

@nikuda

Bug report

Current Behavior

Thumb components are not shown, and not receiving any updates pass the initial inline style applied:

element.style {
    transform: var(--radix-slider-thumb-transform);
    position: absolute;
    left: calc(0% + 0px);
}

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

If the nested span's css is modified from display: none to display: block the element is rendered on left edge and still doesn't move despite the white line being draggable on both ends.

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

Reproducible example

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

Additional context

With Preact v10.10.1 release Slider component no longer hangs the whole app, and for most past it works except for the Thumb components as described above.

Your environment

Software Name(s) Version
Radix Package(s) @radix-ui/react-slider 1.0.0
React n/a n/a
Preact n/a 10.10.1
Browser Chrome 91.0
Assistive tech
Node n/a 16.14.2
npm/yarn yarn 1.22.10
Operating System MacOs / Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions