I am not only asking for help but also making an proposal.
Historically seen phx-click
is working well on a desktop frontend. But with mobile first all around and of course the many touch devices a better UX might be necessary.
For example:
- Many times I have witnessed users ignoring a scrollbar on the first look and starting to swipe or the scrollbar was too small
Here is a fiddle which also supports a simple click but also a long click out of the box:
Having not much experience in creating frontends (and that’s also a reason to use liveview) I wanted to add hammer.js using a phx-hook
.
“Only” problem is hammer is adding addEventListener
on its own.
Anybody got this run already or is using another touch event javascript library to provide this kind of functionality?