You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment ~95% of browsers support touch events, so this property is not really helpful anymore.
Even more: it is confusing and often mistreated (see #5407, #5266, #3944 and many other).
So I propose to retire L.Browser.touch usage in leaflet codebase. For compatibility purposes we have to leave L.Browser.touch as true (and describe that in documentation).
More compromise solution is proposed in #7029.
The text was updated successfully, but these errors were encountered:
Currently in most places of code touch property check is used to prevent attaching excessive listeners if touch is unsupported.
May be that makes sense for legacy devices (though I doubt that it has any impact on performance with modern ones).
Leaflet/src/core/Browser.js
Lines 98 to 104 in d1a1e97
At the moment ~95% of browsers support touch events, so this property is not really helpful anymore.
Even more: it is confusing and often mistreated (see #5407, #5266, #3944 and many other).
Currently we have only 9 occurrences in code.
Some are definitely not important
Leaflet/src/dom/Draggable.js
Line 24 in d1a1e97
Leaflet/src/map/Map.js
Lines 1117 to 1118 in d1a1e97
Other occurrences should be revised, and most probably we'll find that there will be no harm to consider touch as unconditionally supported.
Control.Layers.js
(this is addressed by #7057)
Leaflet/src/control/Control.Layers.js
Lines 202 to 207 in e213469
Tooltip.js
(this is addressed by #7535)
Leaflet/src/layer/Tooltip.js
Lines 109 to 111 in e213469
Leaflet/src/layer/Tooltip.js
Lines 301 to 303 in e213469
So I propose to retire
L.Browser.touch
usage in leaflet codebase.For compatibility purposes we have to leaveL.Browser.touch
astrue
(and describe that in documentation).More compromise solution is proposed in #7029.
The text was updated successfully, but these errors were encountered: