Describe the bug
Looks like onElementClick event works only if pointer position during mousedown event is the same as during mouseup event. If mouse pointer is moved during click, then onElementClick interaction isn't firing. This seems to be different from native browser behaviour, where click events are still recognised if mouse pointer is moved. This difference makes clicks in elastic charts flaky when using a mouse, because start-end positions could be different when clicking while the mouse in motion.
To Reproduce
Steps to reproduce the behavior:
- Go to https://elastic.github.io/elastic-charts/?path=/story/interactions--sunburst-slice-clicks
- Mousedown in one of the slices.
- Slightly change pointer position, leaving the mouse in the same slice
- Mouse up
- See
onElementClick didn't fire
Expected behaviour
OnElementClick interactions fires
Version (please complete the following information):
- OS: Mac
- Browser: Chrome 83
- Elastic Charts: 27.0.0
Additional context
Noticed while working in a kibana dashboard.
Kibana Cross Issues
Add any Kibana related issues here.
Checklist
Delete any items that are not applicable to this issue.
Describe the bug
Looks like
onElementClickevent works only if pointer position duringmousedownevent is the same as duringmouseupevent. If mouse pointer is moved during click, thenonElementClickinteraction isn't firing. This seems to be different from native browser behaviour, where click events are still recognised if mouse pointer is moved. This difference makes clicks in elastic charts flaky when using a mouse, because start-end positions could be different when clicking while the mouse in motion.To Reproduce
Steps to reproduce the behavior:
onElementClickdidn't fireExpected behaviour
OnElementClickinteractions firesVersion (please complete the following information):
Additional context
Noticed while working in a kibana dashboard.
Kibana Cross Issues
Add any Kibana related issues here.
Checklist
Delete any items that are not applicable to this issue.
Kibana Cross Issueslistkibana cross issuetag is associated to the issue if any kibana cross issue is present