Skip to content
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

Tooltip triggered on window resize #2988

Closed
jeffrey-roosendaal opened this issue Apr 13, 2016 · 2 comments
Closed

Tooltip triggered on window resize #2988

jeffrey-roosendaal opened this issue Apr 13, 2016 · 2 comments
Labels
Milestone

Comments

@jeffrey-roosendaal
Copy link

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
@jeffrey-roosendaal jeffrey-roosendaal changed the title Tooltip triggered on resize when there's no grid padding Tooltip triggered on resize Apr 13, 2016
@jeffrey-roosendaal jeffrey-roosendaal changed the title Tooltip triggered on resize Tooltip triggered on window resize Apr 13, 2016
@pissang pissang added the bug label Apr 14, 2016
@pissang
Copy link
Contributor

pissang commented Apr 14, 2016

Yes it is a bug. Thanks for the detailed feedback

@jeffrey-roosendaal
Copy link
Author

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants