Only apply css hover effect on non-touch devices#5285
Merged
HarelM merged 2 commits intomaplibre:mainfrom Jan 4, 2025
Merged
Conversation
Applying hover effect on touch devices has an undesired effect: The element gets set to hover state on touch and stays like that until the next touch event. Using the :active state gives a nicer feedback by highlighting the button only for the duration of the touch.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5285 +/- ##
=======================================
Coverage 91.83% 91.84%
=======================================
Files 282 282
Lines 38908 38908
Branches 6820 6820
=======================================
+ Hits 35733 35734 +1
+ Misses 3047 3046 -1
Partials 128 128 ☔ View full report in Codecov by Sentry. |
Collaborator
|
Can you please a changelog entry? |
HarelM
approved these changes
Jan 4, 2025
ToHold
pushed a commit
to ToHold/maplibre-gl-js
that referenced
this pull request
Oct 31, 2025
* Only apply hover effect on non-touch devices Applying hover effect on touch devices has an undesired effect: The element gets set to hover state on touch and stays like that until the next touch event. Using the :active state gives a nicer feedback by highlighting the button only for the duration of the touch. * add line to changelog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applying hover effect on touch devices has an undesired effect: The element gets set to hover state on touch and stays like that until the next touch event. Using the :active state gives a nicer feedback by highlighting the button only for the duration of the touch. (fixes #5284)
Before:
screen-20250102-133816.mp4
After:
screen-20250102-211517.mp4
Launch Checklist
CHANGELOG.mdunder the## mainsection.