Mouse clicks are not working with laptop touchscreen with HTML5 and Firefox/Chrome.

orbian

Member
I have an application that uses a lot of Mouse->LeftPressed events and it is exported to HTML5. When I run it on a Windows 10 Laptop with Edge it works fine. But Chrome and Firefox won't register the events. However, MouseEnter events seem to register when I touch the screen. I have to use a physical mouse to LeftPressed events to register.

Also, it works fine on Chrome when running on a mobile device.

I am using GM2.

Thanks,
Bob
 

TheouAegis

Member
Is there a Device Mouse event? If not, you will probably need to resort to using the device_* functions. Can file a bug report.
 

orbian

Member
I am using the "Left Pressed" event from the Events menu of the objects. I add GML code to those to perform actions after the user clicks an instance, but they never fire when touching the screen. They only fire when using a physical mouse. I am also using an extension from the marketplace that uses the device_mouse_* functions and that doesn't seem to work either (only works on Edge).

One thing I was able to verify is that the window.addEventListener("click",...) callback is firing. So mouse events from the laptop touchscreen are making it to the JavaScript. Since all of that is obfuscated I can't really compare why Edge works and Chrome/Firefox doesn't.
 

EvanSki

Raccoon Jam Host
Im not very experienced with them but have you tried using the touch input events rather then just a left pressed event?
 
Hi Orbian,

I have the same issue... only touchscreen with Chrome doesnt work... I hope some have the solution... mouse enter works, but left pressed isnt triggerd... I also made an report (with appsurd) and there is no response for 4 months...

Geerts Dennis


Ps device input function doesnt work... I tested device input, left pressed, released and more.
 
Last edited:

TheouAegis

Member
Throwing out ideas. Are you sure Chrome/FF still has focus? On a mobile device, they can't lose focus normally. On Windows, they can somewhat easily.
 

Husky

Member
It seems the touch event on Chrome/Firefox had been fixed in the beta version, however it will cause a performance issue... I'm going to report this to Yoyo.
 

Navid

Member
It seems the touch event on Chrome/Firefox had been fixed in the beta version, however it will cause a performance issue... I'm going to report this to Yoyo.
It still doesn't work well in GameMaker Studio 2.3.2
 
Top