[Bug]: ReferenceError 'TouchEvent is not defined' on main screen #101

Closed
opened 2026-05-11 14:16:22 +00:00 by enjin2310 · 1 comment

While on the main screen, the browser console shows:
ReferenceError: TouchEvent is not defined
from onMouseMove, hostBindings, and decoratePreventDefault
This appears to be a desktop/browser compatibility bug where TouchEvent is referenced in environments that do not support it.
Steps to reproduce:
Open the main screen.
Observe the console.
The attached screenshot shows the error repeating.

While on the main screen, the browser console shows: ReferenceError: TouchEvent is not defined from onMouseMove, hostBindings, and decoratePreventDefault This appears to be a desktop/browser compatibility bug where TouchEvent is referenced in environments that do not support it. Steps to reproduce: Open the main screen. Observe the console. The attached screenshot shows the error repeating.
Owner

Root cause: LizardLogoComponent.onMouseMove (the lizard logo on the main screen, bound to window:mousemove/touchmove) used event instanceof TouchEvent. Firefox/desktop browsers without touch support don't define the global TouchEvent, so the check threw ReferenceError: TouchEvent is not defined on every mouse move — matching the onMouseMove/hostBindings/decoratePreventDefault stack you saw.

Fix in spikerj/spikersoft-angular#2: detect touch via "touches" in event instead, which never references the undefined global. Regression specs added.

Closing as fixed by spikerj/spikersoft-angular#2.

Root cause: `LizardLogoComponent.onMouseMove` (the lizard logo on the main screen, bound to `window:mousemove`/`touchmove`) used `event instanceof TouchEvent`. Firefox/desktop browsers without touch support don't define the global `TouchEvent`, so the check threw `ReferenceError: TouchEvent is not defined` on every mouse move — matching the `onMouseMove`/`hostBindings`/`decoratePreventDefault` stack you saw. Fix in spikerj/spikersoft-angular#2: detect touch via `"touches" in event` instead, which never references the undefined global. Regression specs added. Closing as fixed by spikerj/spikersoft-angular#2.
Sign in to join this conversation.