Tooltip triggered on window resize #2988

Closed
JeffreyRoosendaal opened this Issue Apr 13, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@JeffreyRoosendaal

Problem:

When using:

grid: {
    top: 0,
    left: 0,
    bottom: 0,
    right: 0,
}

the tooltip is triggered after a window resize.


How to duplicate:

Go to, for example: http://echarts.baidu.com/demo.html#area-stack.

Case 1 (correct behaviour):

  • First, you must hover over the graph at least once, so the tooltip will be triggered and shown.
  • When moving your mouse away from the graph, the tooltip will hide again.
  • Now, try to resize your browser window. As you see, nothing strange happens.

Case 2 (bug):

  • Now, set the grid option as shown above (top, left, right, bottom to 0).
  • Then hover your mouse over the graph so the tooltip is triggered,
  • Then move away from the graph again, so the tooltip will be hidden.
  • Now resize you browser window and see what happens: the tooltip gets triggered.

Why does this happen?

I don't know. I have a page with about 6 graphs, and on window resizing, they all started to show their tooltips. I've narrowed it down to:

  • grid options
  • the tooltip must be triggered at least once

I think it may be triggered because since there are no outer edges anymore, so the mouseout function is not called correctly, so the tooltip won't be in it's correct hiding state.

This problem may also happen without setting the grid padding to 0, but it happens way more when you do so.


Tested with:

  • Chrome 49.0
  • Windows 10

@JeffreyRoosendaal JeffreyRoosendaal changed the title from Tooltip triggered on resize when there's no grid padding to Tooltip triggered on resize Apr 13, 2016

@JeffreyRoosendaal JeffreyRoosendaal changed the title from Tooltip triggered on resize to Tooltip triggered on window resize Apr 13, 2016

@pissang pissang added the bug label Apr 14, 2016

@pissang

This comment has been minimized.

Show comment
Hide comment
@pissang

pissang Apr 14, 2016

Contributor

Yes it is a bug. Thanks for the detailed feedback

Contributor

pissang commented Apr 14, 2016

Yes it is a bug. Thanks for the detailed feedback

@JeffreyRoosendaal

This comment has been minimized.

Show comment
Hide comment
@JeffreyRoosendaal

JeffreyRoosendaal Apr 14, 2016

I'd like to add that my version of ECharts is 3.1.6.

I'd like to add that my version of ECharts is 3.1.6.

@pissang pissang added this to the 3.1.7 milestone Apr 16, 2016

@pissang pissang closed this in 96c5fb6 Apr 19, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment