When switching to a mobile device the slider fails to work.
I have an example on ellie
https://ellie-app.com/bWV3GtbNgPpa1
If you switch your browser to mobile then you'll see you cannot use the slider.
I tried this but it didnt work
onMouseDown : (Drag -> RangeDrag) -> Attribute Msg
onMouseDown createRangeDrag =
let
_ = Debug.log "moused" "moused"
in
Html.Styled.Events.on "mousedown" <| Json.Decode.map (DragStart createRangeDrag) position
onTouchDown : (Drag -> RangeDrag) -> Attribute Msg
onTouchDown createRangeDrag =
let
_ = Debug.log "touched" "this has been touched"
in
Html.Styled.Events.on "touchstart" <| Json.Decode.map (DragStart createRangeDrag) position
and
handle value dragCmd =
span [ onMouseDown dragCmd, onTouchDown dragCmd, css [ Css.position Css.absolute, positionFromValue value, handleTop ], class (cssNamespace ++ "handle") ] []
however in a regular browser mode both events are fired
When switching to a mobile device the slider fails to work.
I have an example on ellie
https://ellie-app.com/bWV3GtbNgPpa1
If you switch your browser to mobile then you'll see you cannot use the slider.
I tried this but it didnt work
and
however in a regular browser mode both events are fired