cocos / cocos-engine

Cocos simplifies game creation and distribution with Cocos Creator, a free, open-source, cross-platform game engine. Empowering millions of developers to create high-performance, engaging 2D/3D games and instant web entertainment.
https://www.cocos.com/en/creator
Other
8.87k stars 2.06k forks source link

Chrome on mac is getting the wrong button ID on mouse_move #14119

Closed yeshao2069 closed 1 year ago

yeshao2069 commented 1 year ago

Cocos Creator version

2.4.9,2.4.11

System information

macOS + Chrome、macOS + Safari

Issue description

mac computer on chrome, listening to mouse_move for mouse events, holding down the left mouse button to move, gets a buttonID of 0 (correct), holding down the right mouse button to move, gets a buttonID of 0 (incorrect)

image

mac computer on safari, listening to mouse_move for mouse events, holding down the left mouse button to move, gets a buttonID of 0 (correct), holding down the right mouse button to move, gets a buttonID of 2 (correct)

image

Relevant error log output

No response

Steps to reproduce

Refer to this demo

NewProject_1.zip

Related Forum Feedback

https://discuss.cocos2d-x.org/t/an-issue-with-node-on-cc-node-eventtype-mouse-move-v2-4-9/58158/3

Minimal reproduction project

No response

yeshao2069 commented 1 year ago
image

NewProject_370.zip

I tested with version 3.7.0 and on Chrome + mac, the buttonID obtained is correct.

LoryWu commented 1 year ago

2.4.12-0906版本验证已解决