EkulRF / BestFilmsByCountry

Generating the best films (as determined by internet gods, not me) for every country using TMDB API.
https://ekulrf.github.io/BestFilmsByCountry/
1 stars 0 forks source link

add "hover on touch" for mobile devices #4

Open alifeee opened 12 months ago

alifeee commented 12 months ago

on PC you can hover...

image

on mobile if you press on a country it clicks, so you get redirected to that film's entry on TMDB. This is kinda annoying.

It'd be nice if it could tell what was a tap and what was a click, so it was nicer on mobile

EkulRF commented 11 months ago

suggestion for how?

alifeee commented 11 months ago

not sure

currently HTML is shown on a javascript event. This event is "on hover"

these are the events that jvm map emits, which we can attach to (in a similar way to how it currently works)

image

These threads may have some help

https://stackoverflow.com/questions/22559756/changing-hover-to-touch-click-for-mobile-devices

https://www.prowebdesign.ro/how-to-deal-with-hover-on-touch-screen-devices/

https://medium.com/@mezoistvan/finally-a-css-only-solution-to-hover-on-touchscreens-c498af39c31c

The alternative (hacky solution) is to change how it works if the screen width is small (proxy for "is mobile device"), i.e., make clicking not open the film in a new tab, but show the poster underneath the map, etc.