wails icon indicating copy to clipboard operation
wails copied to clipboard

[v2] MouseEvent.button returns 1 on back button press

Open kybin opened this issue 3 years ago • 4 comments

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

  1. On anywhere in the app.
  2. Back mouse button click.
  3. 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

kybin avatar Jul 13 '22 12:07 kybin

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.

leaanthony avatar Jul 14 '22 11:07 leaanthony

@kybin - any updates?

leaanthony avatar Jul 17 '22 00:07 leaanthony

Sorry I was away from my computer a while.

Unfortunately it (onmousedown) gives the same result (returns 1) for me.

kybin avatar Jul 17 '22 23:07 kybin

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.

leaanthony avatar Jul 18 '22 09:07 leaanthony

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.

stale[bot] avatar Nov 02 '22 02:11 stale[bot]