Trackpad pinch zoom is too sensitive
Author: diachedelicCreated Jun 21, 2024Updated Sep 15, 2026
Labelsrefactoring
Checklist
- I've looked at the documentation to make sure the behavior isn't documented and expected.
- I'm sure this is an issue with Leaflet, not with my app or other dependencies (Angular, Cordova, React, etc.).
- I've searched through the current issues to make sure this hasn't been reported yet.
- I agree to follow the Code of Conduct that this project adheres to.
Steps to reproduce
- Open any Leaflet map on a device with a trackpad, such as a laptop.
- Zoom the map using a pinch gesture.
- Without removing your fingers from the trackpad, very slowly move your fingers apart or together.
Expected behavior
The pinch gesture should change the map's zoom level in a gradual and controlled manner, as it does on a touch device.
Current behavior
Each tiny movement of the fingers changes the zoom level by at least 1, leading to disorientatingly fast changes to the map's bounds. With almost no movement of the fingers, it is possible to take the map from the minimum to the maximum zoom.
Minimal example reproducing the issue
https://jsfiddle.net/sntgvj1L/2/
Environment
- Leaflet version: 1.9.4
- Browser (with version): Chrome v126, Safari v17.5 (not Firefox, which does not seem to support pinch to zoom on a Mac)
- OS/Platform (with version): MacOS 14.5
Note that these are only the browsers I have tested with. I believe the problem is present on any device with a trackpad.
Source: Leaflet/Leaflet