Correct Browser.touch (and more related changes) (#7029)

* Simplify touch detection

1. Detect touch in recommended way
   Ref: https://www.chromestatus.com/feature/4764225348042752
   More: https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/KV6kqDJpYiE/YFM28ZNBBAAJ

2. Drop legacy Firefox touch support
   It is deprecated since Gecko 25.
   https://developer.mozilla.org/en-US/docs/Web/API/DocumentTouch

* Introduce `Browser.touchNative`, separated from `Browser.touch`

Bring `Browser.touch` description to reality.
Add brief note about pointer->touch processing in Leaflet.

* DomEvent: do not use pointer wrapper when native touch events are available
This commit is contained in:
johnd0e
2021-11-01 11:32:06 +03:00
committed by GitHub
parent 404e1b9474
commit 0ae68f4658
4 changed files with 12 additions and 11 deletions

View File

@ -1,2 +0,0 @@
// Trick Leaflet into believing we have a touchscreen (for desktop)
if (window.TouchEvent) { window.ontouchstart = function(){} };