Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Touchscreen detection broken in Chrome 70 (desktop) #1292

Open
khabraken opened this issue Nov 23, 2018 · 0 comments
Open

Touchscreen detection broken in Chrome 70 (desktop) #1292

khabraken opened this issue Nov 23, 2018 · 0 comments

Comments

@khabraken
Copy link
Contributor

khabraken commented Nov 23, 2018

Chrome 70 has disabled the ontouch* APIs on desktop, see https://www.chromestatus.com/feature/4764225348042752

This prevents touchscreen detection (and subsequently functionality) in the leaflet source:

var touch = !window.L_NO_TOUCH && !phantomjs && (pointer || 'ontouchstart' in window ||

As per the first link, the appropriate fix should probably be "site should use navigator.maxTouchPoints for touchscreen detection, and Windows.TouchEvent for TouchEvent feature detection".

Alternatively, the 'pointer' variable:

pointer = (window.PointerEvent && window.navigator.pointerEnabled) ||

should be updated to match what the most recent leaflet source sets it to:
https://github.com/Leaflet/Leaflet/blob/9fda888df2791ca0df6f182a9d91d393ee49034c/src/core/Browser.js#L95
(navigator.pointerEnabled was deprecated ages ago and was never standard, thus 'pointer' always ends up false)

Further reading:
https://bugs.chromium.org/p/chromium/issues/detail?id=897906

modos189 added a commit to IITC-CE/ingress-intel-total-conversion that referenced this issue Nov 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant