wails
wails copied to clipboard
[v2] MouseEvent.button returns 1 on back button press
Description
window.onclick fired with unwanted MouseEvent.button value on a mouse click.
These are the values I got.
Left: 0 Middle: 1 Right: doesn't fire the event. shows context menu Back: 1
I need 3 for Back button.
To Reproduce
- On anywhere in the app.
- Back mouse button click.
- Got 1 from MouseEvent.button.
Expected behaviour
Get 3 for Back button.
Screenshots
No response
Attempted Fixes
No response
System Details
System
------
OS: MacOS
Version: 12.4
ID: 199506
Go Version: go1.18.1
Platform: darwin
Architecture: amd64
Wails
------
Version: v2.0.0-beta.38
Revision: 7a634649977241d00abc7e4b7fc4779a6a465923
Modified: false
Dependency Package Name Status Version
---------- ------------ ------ -------
xcode command line tools N/A Installed 2395
npm N/A Installed 8.11.0
*upx N/A Available
*nsis N/A Available
* - Optional Dependency
Additional context
No response
I was able to reproduce on Windows but discovered that this worked: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button - Can you please try that? I've added a guide for it.
@kybin - any updates?
Sorry I was away from my computer a while.
Unfortunately it (onmousedown) gives the same result (returns 1) for me.
I would recommend looking at any driver or system mappings for your mouse. The Mozilla guide on how to do this absolutely works as intended for me.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.