Skip to content

[Bug] 在触屏设备中,echarts.getZr().on('mouseover')空白处是无返回的,而在文档中说鼠标在任何地方都能触发zrender的鼠标事件 #19296

@liuwo23

Description

@liuwo23

Version

5.4.3

Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?c=map-HK

Steps to Reproduce

我在一个触屏设备中检测鼠标的mouseover事件,在有目标的情况之下,mouseover正常触发,在无目标的区域(即空白处)mouseover没有正常触发。当我换成一个没有触屏功能的显示器时,mouseover在有目标和无目标的区域都能触发。
我想这应该是zrender的一个兼容触屏的bug,导致的问题。

  myChart.getZr().on('mousemove', function(event){
      console.log('onmousemove!!!!')
  })

Current Behavior

在触屏设备中,zrender的 mouseover 对无目标的区域(即空白区域)没有触发鼠标事件,click事件是正常的,空白处也能触发,但是mouseover有异常

Expected Behavior

在触屏设备中,zrender的 mouseover 也应该和click事件一样,都能在空白区域进行触发,就像文档中说的那样”zrender 事件与 echarts 事件不同。前者是当鼠标在任何地方都会被触发,而后者是只有当鼠标在图形元素上时才能被触发。“

Environment

- OS: winodws 10
- Browser: chrome 119.0.6045.123
- Framework:

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpendingWe are not sure about whether this is a bug/new feature.staleInactive for a long time. Will be closed in 7 days.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions