Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: do not hide contextmenu on movestart
If user opens a contextmenu on touch devices by long tap, in most cases he also moves the map unintentionally. In most cases this does not fire a `movestart` event. But if the map has `maxBounds` and the map is bounced back, a `movestart` event is fired. In this case the contextmenu is hidden immediately after opening, which totally breaks UX. Hiding contextmenu on `movestart` event may not be needed at all. As far as I researched there is no scenario in which the user can move the map intentionally after contextmenu is opened without firing a `mousedown` or `pointerdown` event before. Therefor contextmenu is already closed before `movestart` event is fired. There is only one scenario I noticed in which a `movestart` is fired while contextmenu is visible. Using mouse as well as using touch a user is able to move the map while opening a contextmenu. He could hold right-click or tab and moving map while opening contextmenu. This triggers a `movestart` only if he is using a mouse. Since this was inconsitent between mouse and touch input, I would consider it a bug. Fixes #94
- Loading branch information