johnd0e 05fa5802a6
New TapHold handler instead of legacy Tap (#7026)
* Replace legacy over-functional Tap handler with much simpler TapHold handler

as currently it is needed only for single purpose: emulate `contextmenu` on iOS.

* `tapHold` map option can be forced now

Anyway, this option is not meant to be explicit,
any overriding is useful for debug purposes only.

* Remove Map.Tap

* Get rid of deprecated initMouseEvent

Use MouseEvent constructor.

Note: some properties are commented out, as they may vary between browsers.

Ref:
- https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent
- https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent

Compatibility:
- https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent#browser_compatibility

Some legacy browsers lacks support, but here we care only about iOS Safari.
(Anyway it can be solved with polyfill)

* Add tests for Map.TapHold.js
2021-11-26 13:38:24 +02:00
..