Clooos / Bubble-Card

Bubble Card is a minimalist card collection for Home Assistant with a nice pop-up touch.
MIT License
1.46k stars 41 forks source link

fix: mobile drag open execute the actions #391

Closed brunosabot closed 4 months ago

brunosabot commented 4 months ago

Here is another PR to fix a bug I encounter: I am on mobile an I try to scroll my page. If my scroll starts on a bubble-card, it execute the action even if my drag ends on another element (not really sure which one -probably hold-). This is caused by the mouse events behavior which is a bit different than the mouse ones.

To solve this, I used the pointer events, that should be compatible anywhere (I don't have an iPhone, so I can't be sure it's working fine on iPhone, but desktop and Android are OK).

I also change a bit how ActionHandler works: this allows to reduce the amount of timeout executed in the page.

Finally, some arguments were not used so I removed them.

Clooos commented 4 months ago

I will try this right now! Thanks again!