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
I noticed some years ago that some html5 games do not work correctly in my browser. The problem is always the same - a click at any point in the canvas always registers as a click at one specific element on the screen. I couldn't pinpoint the issue correctly so I didn't know where to ask help for this, so I just shrugged back then, started Chrome and the game worked as expected in it. Recently I decided to investigate and after a debug session I found that the game in question uses CreateJS and soon I found the culprit:
CreateJS uses getImageData canvas method to detect a hit on an element. With fingerprinting protection enabled this method returns random noise on Firefox. So CreateJS always detects a hit on the first displayed object, no matter where the click actually happened.
Thanks for letting us know. Just digging around and do not see an easy fix. If anyone knows how other canvas frameworks get around this - or if they do, then please pass along the tip.
I am not sure that click coordinates will do it without knowing a pixel color at those coordinates. If anyone sees a specific location in the CreateJS code and perhaps a working example of using image coordinates or other, let us know and we can dig further. It was relate to rollover functionality, hitTest, getObjectsUnderPoint, etc.
Activity
danzen commentedon Jan 24, 2026
Thanks for letting us know. Just digging around and do not see an easy fix. If anyone knows how other canvas frameworks get around this - or if they do, then please pass along the tip.
eternal-sorrow commentedon Jan 24, 2026
Just don't use the image extraction to determine the element clicked. Use the click coordinates.
danzen commentedon Feb 3, 2026
I am not sure that click coordinates will do it without knowing a pixel color at those coordinates. If anyone sees a specific location in the CreateJS code and perhaps a working example of using image coordinates or other, let us know and we can dig further. It was relate to rollover functionality, hitTest, getObjectsUnderPoint, etc.