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
While working with the leaflet sidebar-v2 on a smartboard, I noticed that the mouse click events on the sidebar tabs were not being captured, and that only touch events were being captured.
This issue stems from several lines of code in the sidebar plugin which don't add a click event listener if the device has touchscreen capabilities, so for device which has both a touch screen and a mouse, the sidebar wont work when using the mouse. var e = this._hasTouchStart ? 'touchstart' : 'click';
After doing some testing with IE, Chrome, and Firefox on a standard windows desktop, a mac desktop, a nexus tablet, and a smartboard, it appears that having the touchstart event capture is redundant since the default click event in leaflet is already capturing both touch and click events.
I will shortly be submitting a pull request to address this issue, by removing this._hasTouchStart = L.Browser.touch && ('ontouchstart' in document.documentElement);
and changing var e = this._hasTouchStart ? 'touchstart' : 'click';
to var e = 'click';
The text was updated successfully, but these errors were encountered:
While working with the leaflet sidebar-v2 on a smartboard, I noticed that the mouse click events on the sidebar tabs were not being captured, and that only touch events were being captured.
This issue stems from several lines of code in the sidebar plugin which don't add a click event listener if the device has touchscreen capabilities, so for device which has both a touch screen and a mouse, the sidebar wont work when using the mouse.
var e = this._hasTouchStart ? 'touchstart' : 'click';
After doing some testing with IE, Chrome, and Firefox on a standard windows desktop, a mac desktop, a nexus tablet, and a smartboard, it appears that having the
touchstart
event capture is redundant since the defaultclick
event in leaflet is already capturing both touch and click events.I will shortly be submitting a pull request to address this issue, by removing
this._hasTouchStart = L.Browser.touch && ('ontouchstart' in document.documentElement);
and changing
var e = this._hasTouchStart ? 'touchstart' : 'click';
to
var e = 'click';
The text was updated successfully, but these errors were encountered: