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

Brush drag gets stuck when the mouse leaves the chart area #10675

Closed
tmtron opened this issue Jun 14, 2019 · 2 comments · Fixed by #11516
Closed

Brush drag gets stuck when the mouse leaves the chart area #10675

tmtron opened this issue Jun 14, 2019 · 2 comments · Fixed by #11516
Assignees
Labels
bug en This issue is in English
Milestone

Comments

@tmtron
Copy link

tmtron commented Jun 14, 2019

Version

4.2.1

Reproduction link

https://jsfiddle.net/tmtron/kdaqhpjv/108//

Note: the jsfiddle example still uses V4.1.0 (but in our app we can also see the issue with V 4.2.0)

Steps to reproduce

  • left-click in the chart area and HOLD the left button
  • now the brush-drag is active: we can move the mouse around and the area will follow
  • but when we exit the chart area (e.g. far to the right on the grey area) and then release the mouse button (still on the grey area), the brush-drag mode gets stuck
    • what I mean is, when you now move the mouse back to the chart area, the brush-drag is still active: i.e. the mouse move will resize the brush area although the left-mouse button is NOT pressed down anymore
    • this will only stop when you make another click inside the chart area

BrushOut

What is expected?

the brush mode should stop (same as releasing the pressed mouse button)

What is actually happening?

the brush mode ist stuck: when you release the mouse button outside the canvas, and reenter, the brush is still following the mouse movements

As a workaround I tried to fire a 'mouseup' event when the 'globalout' event occurs, but that does not work.

@echarts-bot
Copy link

echarts-bot bot commented Jun 14, 2019

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

Have a nice day! 🍵

@echarts-bot echarts-bot bot added bug en This issue is in English pending We are not sure about whether this is a bug/new feature. waiting-for-help labels Jun 14, 2019
@Ovilia Ovilia removed pending We are not sure about whether this is a bug/new feature. waiting-for-help labels Jun 17, 2019
@pissang pissang added this to the 4.5.0 milestone Sep 17, 2019
100pah added a commit that referenced this issue Oct 29, 2019
…area: the brushed area or dataZoom window will be released at that case, but not keep in dragging state. fix #10675.
@vivsvaan
Copy link

@tmtron I used Mouse Events to release the mouse click when we leave chart view/area.
When we use <div echarts ...> to produce our chart, it generated an < canvas > element in HTML.
You just have to trigger a mouseup event on that < canvas > element when mouse leaves the chart view/area.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug en This issue is in English
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants