We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d1f9c2 commit 83ff46bCopy full SHA for 83ff46b
1 file changed
app/javascript/maplibre/map.js
@@ -181,7 +181,6 @@ export async function initializeMap (divId = 'maplibre-map') {
181
preventDefault: () => {}
182
})
183
map.longPressTriggered = true
184
- setTimeout(() => { map.longPressTriggered = false }, 100)
185
cancelLongPress()
186
}, 500)
187
@@ -193,7 +192,10 @@ export async function initializeMap (divId = 'maplibre-map') {
193
192
if (dx > 10 || dy > 10) cancelLongPress()
194
195
196
- map.on('touchend', cancelLongPress)
+ map.on('touchend', () => {
+ cancelLongPress()
197
+ setTimeout(() => { map.longPressTriggered = false }, 0)
198
+ })
199
}
200
201
// map.on('error', (err) => {
0 commit comments