aforemny / elm-mdc

Elm port of the Material Components for the Web CSS/JS library
https://aforemny.github.io/elm-mdc
Apache License 2.0
354 stars 43 forks source link

Slider Selection not reflective of mouse position #292

Closed ropwareJB closed 4 years ago

ropwareJB commented 4 years ago

The 'Slider' component does not work as intended when an ancestor div has margin-left style, and offset in other manners.

Slider Issue

aforemny commented 4 years ago

There was a fix merged upstream that I think addresses the same issue.

berenddeboer commented 4 years ago

Thanks so much! That fix was not mentioned anywhere in their docs. Let me know if the latest master works better.

berenddeboer commented 4 years ago

I was too quick, it actually does not work when the sidebar is open. It seems we need to call getClientBoundingRect to do this stuff correctly.