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

Plugin event filters receive normalized event type and fail when normalization occurs #9581

Closed
kurkle opened this issue Aug 25, 2021 Discussed in #9580 · 1 comment · Fixed by #9613
Closed

Plugin event filters receive normalized event type and fail when normalization occurs #9581

kurkle opened this issue Aug 25, 2021 Discussed in #9580 · 1 comment · Fixed by #9613

Comments

@kurkle
Copy link
Member

kurkle commented Aug 25, 2021

Discussed in #9580

Originally posted by beibean August 25, 2021
Hi there,

I am using a touchscreen on a embedded device and after migrating from v2.9.4 to v3.5.1 I am not able to show tooltip as used to show it before.

I only need to show tooltip when user touches any part of the graph. We detect touches with pointerdown and pointerup events. After the library upgrade only the point is hover but the tooltip won't show:

image

Here is a project to reproduce it.

Any new configuration I overlooked or any suggestion to fix this?

Description

This originates from #8876

The event type is changed here:

const type = EVENT_TYPES[event.type] || event.type;

Original types are used to filter and it does not match.

This can be worked around by adding the normalized events: events: ['mousedown', 'mouseup'] to options.plugins.tooltip

@kurkle kurkle changed the title How to show tooltip within touchscreen? Plugin event filters receive normalized event type and fail when normalization occurs Aug 26, 2021
@kurkle
Copy link
Member Author

kurkle commented Sep 2, 2021

Testing this needs a fix to test-utils: chartjs/chartjs-test-utils#14

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

Successfully merging a pull request may close this issue.

2 participants