AnthonMS / my-cards

Bundle of my custom Lovelace cards for Home Assistant. Includes: my-slider, my-slider-v2, my-button
Other
104 stars 27 forks source link

Horizontal slider mess up with Lovelace Swipe Navigation #18

Closed Timofiev closed 2 years ago

Timofiev commented 2 years ago

Hi!

First of all I want to thank you, it's awesome as a user to see how much work you put in this feature and it's great.

I have an issue that the horizontal slider is interacting with the Lovelace Swipe Navigation on my android phone. When I slide the slider the views change. I changed the slider to vertical now it seems ok and I initially wanted to use vertical just FYI. It's maybe not even this card's fault but the Lovelace Swipe Navigation's.

Keep up the good work, Cheers!

ChrisK14 commented 2 years ago

Hey :)

I am sharing the same issue. I am using the Minimalist UI which is utilizing the slider. In the UI scrolling vertically on the Dashboard is very hard, as everytime you start your scroll on the slider it will toggle the device behind it, even though I just wanted to scroll. I am also on an Android.

@Tomofiev It doesn't look like this is Lovelace Swipe Navigation Issue, as for other cards this issue does not exist.

Thank for you work :)

AnthonMS commented 2 years ago

I'm guessing it has something to do with touch events clicking through the slider and activating the other cards touch events. I will see if I can duplicate the bug in some testing environment so I can fix it. But I cannot say when that'll be.

AnthonMS commented 2 years ago

I'm assuming it can be resolved by calling preventDefault on touch devices? I don't know if this bug is still active on the new slider-v2 card. If it is, then I encourage you to open a new issue and we will figure it out.