Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Don't attach POI 'hover' interaction on mobile devices #1010

Merged
merged 1 commit into from
Jan 15, 2021

Conversation

bbecquet
Copy link
Contributor

Description

Add a isMobileDevice check around the declaration of hover interactions on POIs, as they can be properly done on touch-based device.

This is an imperfect solution, as it doesn't react to screen size changes after loads and uses the screen size as a criterion for determining if the device is touch-based, but I did it because we already solved the same problem on the dynamic POI layer the same way https://github.com/QwantResearch/erdapfel/blob/master/src/adapters/scene_category.js#L93-L96

A better way to implement that is to use a hover media query, but as this isn't supported on IE11 it would disable on this browser.
I've added this to the list of things we can improve after we ditch IE11.

@bbecquet bbecquet requested a review from amatissart January 15, 2021 11:11
@bbecquet bbecquet merged commit 13e960a into Qwant:master Jan 15, 2021
@bbecquet bbecquet deleted the fix-poi-hover-on-mobiles branch January 15, 2021 13:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants