apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.1k stars 19.6k forks source link

[Bug] 移动端 h5 饼图长按无法触发 click 和 selectchanged 事件,但是饼图实际上有选中变化。(The mobile h5 pie chart length press cannot trigger click and selectchanged events, but the pie chart is actually selected.) #17402

Closed huk10 closed 1 month ago

huk10 commented 2 years ago

Version

5.3.2

Link to Minimal Reproduction

https://codepen.io/kun23/pen/KKoWvge

Steps to Reproduce

在 pc 端的打开手机调试模式,长按一个饼图块,会发现没有触发 click 和 selectchange 事件,但是对应的块已被选中,长按会触发一个 contextmenu 事件。 在手机真机打开(ios 14.8,安卓上也是一样的)现象同上,但是 contextmenu 事件也不会触发了。

Turn on the debug mode of the phone on the pc side, and long press a pie block, you will find that no click and selectchange events are triggered, but the corresponding block has been selected, and a contextmenu event will be triggered by the long press. The phenomenon of turning on the real phone (ios 14.8, the same on Android) is the same, but the contextmenu event will not be triggered.

Current Behavior

我在一个饼图中需要针对饼图的选中操作做一下响应,需要 dataIndex 修改界面UI,发现手机上存在这个问题,搜索了一下没有得到解决方案。

I need to respond to the selected operation of the pie chart in a pie chart. I need dataIndex to modify the interface UI. I found this problem on the phone. I searched it and didn't get a solution.

Expected Behavior

能够有一个事件正确触发,selectchange 或者 click 都行。

Can have an event triggered correctly, either selectchange or click.

Environment

- OS: ios 14.8
- Browser: safari 
- Framework: not framework, native

Any additional comments?

如果取消 css 中的 user-select:none;ios 上会触发弹出复制文本菜单。

If you cancel the user-select:none;ios in css, a pop-up copy text menu will be triggered.

echarts-bot[bot] commented 2 years ago

@io-huk It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED
**TITLE** [Bug] The click and selectchanged events cannot be triggered by long-pressing the h5 pie chart on the mobile side, but the pie chart actually has a selected change. (The mobile h5 pie chart length press cannot trigger click and selectchanged events, but the pie chart is actually selected.) **BODY** ### Version 5.3.2 ### Link to Minimal Reproduction https://codepen.io/kun23/pen/KKoWvge ### Steps to Reproduce Open the phone debugging mode on the pc side, long press a pie block, you will find that the click and selectchange events are not triggered, but the corresponding block has been selected, and a long press will trigger a contextmenu event. When the real phone is turned on (ios 14.8, the same on Android), the phenomenon is the same as above, but the contextmenu event will not be triggered. Turn on the debug mode of the phone on the pc side, and long press a pie block, you will find that no click and selectchange events are triggered, but the corresponding block has been selected, and a contextmenu event will be triggered by the long press. The phenomenon of turning on the real phone (ios 14.8, the same on Android) is the same, but the contextmenu event will not be triggered. ### Current Behavior In a pie chart, I need to respond to the selection operation of the pie chart, and I need to modify the interface UI with dataIndex. I found that this problem exists on the mobile phone, and I searched and found no solution. In a pie chart, I need to respond to the selection operation of the pie chart, and I need to modify the interface UI with dataIndex. I found that this problem exists on the mobile phone, and I searched and found no solution. I need to respond to the selected operation of the pie chart in a pie chart. I need dataIndex to modify the interface UI. I found this problem on the phone. I searched it and didn't get a solution. ### Expected Behavior To be able to have an event fired correctly, selectchange or click will do. Can have an event triggered correctly, either selectchange or click. ### Environment ````markdown - OS: ios 14.8 - Browser: safari - Framework: not framework, native ```` ### Any additional comments? If you cancel user-select: none in css; on ios, a popup copy text menu will be triggered. If you cancel the user-select:none;ios in css, a pop-up copy text menu will be triggered.
github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

github-actions[bot] commented 1 month ago

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!