当启用 click: true 配置派发事件时无法区分是左键点击还是右键点击
Author: cherrolCreated Mar 5, 2024Updated Dec 25, 2025
Version
2.4.2
Reproduction link
https://codepen.io/cherrol/pen/OJGVOmw
Steps to reproduce
点击 a 标签时,派发的事件 event.button 都是 0 ,无法区分是左键点击还是右键点击
What is expected?
左键点击的 event.button 为 0,右键点击的 event.button 为 1。
What is actually happening?
左键和右键点击的 event.button 都为 0
在滚动区域有链接需要跳转,无法区分左键还是右键时,右键也会直接跳转,不符合操作习惯。
Source: ustbhuangyi/better-scroll