Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrolling within the plotly card swipes the tab #20

Closed
dbuezas opened this issue Nov 2, 2022 · 6 comments
Closed

Scrolling within the plotly card swipes the tab #20

dbuezas opened this issue Nov 2, 2022 · 6 comments
Labels
❌ invalid This doesn't seem right

Comments

@dbuezas
Copy link
Contributor

dbuezas commented Nov 2, 2022

I'm not sure if I should preventDefault touch events within the plotly graphs card or if there is an elegant way of "fixing" from within hass-swipe-navigation.

@dbuezas
Copy link
Contributor Author

dbuezas commented Nov 2, 2022

Alternative solution:

  • Ignore swipe if the time difference between touchstart and touchend goes over s hardcoded theshold

@zanna-37
Copy link
Owner

zanna-37 commented Nov 2, 2022

Wait, is it really swiping?
Because this line is meant to prevent that, and it's working for me.

@dbuezas
Copy link
Contributor Author

dbuezas commented Nov 3, 2022

Oh, that's odd... It is swiping indeed. I can make a gif later if that helps.
Even if I drag and then stop for seconds before releasing (which was the target of my proposed solution).
But I modified the src, maybe I broke something. There's even the chance that I took the source from the wrong repository by mistake.
I'll double check today

@zanna-37
Copy link
Owner

zanna-37 commented Nov 3, 2022

Be sure you're using the plotly production card, I only tested with that and maybe the -dev one use a different html ID.

@dbuezas
Copy link
Contributor Author

dbuezas commented Nov 3, 2022

Indeed I had copy pasted the source from some other repo (probably the one this forks).
This issue does indeed not exist in your branch :)

Anyway, you may want to still consider having a maximum swipe duration to avoid this incompatibility with other "not-accounted for" cards :)

@dbuezas dbuezas closed this as completed Nov 3, 2022
@zanna-37
Copy link
Owner

zanna-37 commented Nov 3, 2022

Anyway, you may want to still consider having a maximum swipe duration to avoid this incompatibility with other "not-accounted for" cards :)

I agree, I will.
Edit: see #21

@zanna-37 zanna-37 added the ❌ invalid This doesn't seem right label Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❌ invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants