-
-
Notifications
You must be signed in to change notification settings - Fork 742
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
Control buttons don't reset to inactive style after click on touch devices #5284
Comments
I tend to think this is related to the following issue: I believe this is related to a11y (accessibility) definitions of Firefox and mobile chrome. |
Ok, I think I've found the issue: CSS that causes this effect maplibre-gl-js/src/css/maplibre-gl.css Line 183 in 22b95df
This jsbin shows the fixed behavior. |
Can you link to an article about the discouraging you referenced above? |
I've corrected the jsbin link. I found for example this article related to the issue. Recording of touch device behavior with the patch: screen-20250102-211517.mp4 |
Which jsbin has a fix that works on mobile? |
The jsbin https://jsbin.com/dedemareco/1/edit?html,output shows the behavior from the fixed video for me. I've also created: https://jsbin.com/wedujofugo/1/edit?html,css,output which has the full updated CSS from #5285 |
I cannot explain this.... This is a video I just recorded of https://jsbin.com/wedujofugo/1/edit?html,css,output with Chrome 131 on Android 15: screen-20250103-120839.mp4It works nicely there now. |
I have Android 14 but chrome 131 as well... Weird... |
I've also tried on Safari/Ipad now, which shows the fixed behavior. Maybe you can try with Firefox/Chrome DevTools on Desktop, they can emulate touch device behavior too. For me, they also show it fixed. |
It's probably an improvement, so I'll merge it as is, you are welcome to continue try and reproduce what I'm seeing on your end to be able to solve this for more devices... |
Thanks for your support! |
maplibre-gl-js version: 4.7.1 / 5.0
browser: Mobile Firefox, Mobile Chrome
Steps to Trigger Behavior
The issue only happens on mobile browsers / touch devices. On desktop, the control button style resets correctly after click.
Link to Demonstration
Demo: https://jsbin.com/bomimibija/edit?html,output
Expected Behavior
Control button highlight style should reset after click.
Actual Behavior
Control button highlight style stays active until click on map.
Video:
screen-20250102-133816.mp4
The text was updated successfully, but these errors were encountered: