The plugin is currently throwing errors on some legacy Firefox versions:
ReferenceError: event is not defined
The issue is the function detectTap that gets called from onmouseup events. Since event is not defined within the function scope, it looks up window.event instead. It works on most browsers, but we're getting errors on some legacy Firefox versions where window.event is unsupported or bugged and returns undefined, causing the error.
I think it would be better to pass event as an argument to detectTap. This would also be consistent with how the rest of the code is structured, so I guess this is simply an oversight? Either way, relying on window.event is not recommended: https://developer.mozilla.org/en-US/docs/Web/API/Window/event
The plugin is currently throwing errors on some legacy Firefox versions:
The issue is the function
detectTap
that gets called fromonmouseup
events. Sinceevent
is not defined within the function scope, it looks upwindow.event
instead. It works on most browsers, but we're getting errors on some legacy Firefox versions where window.event is unsupported or bugged and returnsundefined
, causing the error.I think it would be better to pass
event
as an argument todetectTap
. This would also be consistent with how the rest of the code is structured, so I guess this is simply an oversight? Either way, relying onwindow.event
is not recommended: https://developer.mozilla.org/en-US/docs/Web/API/Window/eventCheers!