dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

Slider component is not usable when the App is launched with `dioxus_native::launch(App);`

Open mtkuwav opened this issue 3 months ago • 3 comments

Problem

When the App is launched with dioxus_native::launch(App);, the Slider component can't be clicked and dragged, and just stays static. Also, the thumb is displayed a bit under the SliderThumb.

Steps To Reproduce

Steps to reproduce the behavior:

  • Create a dioxus project with dx new and use any sub-template you want
  • Add dioxus_native to your Cargo.toml
  • Create a Slider component, you can do that simply by doing dx component add slider and take the Demo component from the Dioxus Components page for example
  • in the main() function, replace :
    dioxus::launch(App);
    
    with :
    dioxus_native::launch(App);
    
  • Serve your app with dx serve

Expected behavior

The Slider component should properly work when clicked and dragged when launching the app with dioxus_native

Screenshots

https://github.com/user-attachments/assets/8d5941f3-dcc0-45fb-bb33-3a88437790fa

Environment:

  • Dioxus version: v0.7.0 & v0.7.1
  • Rust version: 1.91.1
  • OS info: EndeavourOS with KDE Plasma 6.5.3
  • App platform: desktop

mtkuwav avatar Dec 02 '25 16:12 mtkuwav

This is currently expected behavior because blitz doesn't support javascript. We should at least log a warning if eval is called inside of blitz about javascript support.

We may be able to support this in the future once we have a cross platform DOM API

ealmloff avatar Dec 02 '25 17:12 ealmloff

Understood, thank you for your reply !

mtkuwav avatar Dec 03 '25 08:12 mtkuwav

We may be able to support this in the future once we have a cross platform DOM API

Hopefully we can start supporting some of these things in the component library before we have cross-platform DOM API by conditionally compiling code. But we'll at least need some access to low-level DOM APIs in native to unblock this.

nicoburns avatar Dec 05 '25 02:12 nicoburns