-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛S2Event.GLOBAL_CONTEXT_MENU 事件无法触发 #2687
Comments
不管 Windows 还是 Mac,好像都没法阻止默认的右键弹窗~ [
S2Event.GLOBAL_SCROLL,
S2Event.ROW_CELL_CLICK,
S2Event.COL_CELL_CLICK,
S2Event.CORNER_CELL_CLICK,
S2Event.DATA_CELL_CLICK,
S2Event.GLOBAL_SELECTED,
S2Event.DATA_CELL_BRUSH_SELECTION,
S2Event.LAYOUT_RESIZE,
S2Event.GLOBAL_CONTEXT_MENU,
].forEach((eventName) => {
s2.on(eventName, event => {
if (eventName === S2Event.GLOBAL_CONTEXT_MENU) {
// 没有效果
event.preventDefault();
event.stopPropagation();
// 这样也没有效果
event.originalEvent.preventDefault();
event.originalEvent.stopPropagation();
}
});
}); |
2.0 版本右键事件使用的 G 的 s2.getCanvasElement().addEventListener('contextmenu', (event) => {
event.preventDefault();
}); |
你好 @XiChaoMing,很抱歉给你带来了不好的体验, 我们会尽快排查问题并修复, 请关注后续发布日志. Hello, @XiChaoMing, We are so sorry for the bad experience. We will troubleshoot and fix the problem as soon as possible. Please pay attention to the follow-up change logs. |
🎉 This issue has been resolved in version @antv/s2-v2.0.0-next.19 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version @antv/s2-react-v2.0.0-next.18 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🏷 Version
Sheet Type
🖋 Description
对
S2Event.GLOBAL_CONTEXT_MENU
事件进行了监听,在 Mac 触摸板上面进行右击操作,无法准确触发该事件的执行(在 Windows 上目前没问题)🔗 Reproduce Link
S2Event.GLOBAL_CONTEXT_MENU
😊 Expected Behavior
使用 Mac 触控板,右击事件可以准确执行
😅 Current Behavior
使用 Mac 触控板,右击事件无法准确执行
💻 System information
The text was updated successfully, but these errors were encountered: