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

Rewrite unit test waitForResize helper #4566

Merged
merged 1 commit into from
Jul 26, 2017

Conversation

simonbrunel
Copy link
Member

@simonbrunel simonbrunel commented Jul 26, 2017

The original implementation tries to intercept events from the chart internal iframe, which ones failing on Chrome 60. Checking internals doesn't seem the best approach, instead we could consider that a chart has been resized after the resize method has been called and processed. So let's hook Chart.resize and callback once it's done.

This PR would replace #4564 since it doesn't force us to switch on Chrome beta (even temporary) and also fixes running unit test locally.

@benmccann

The original implementation tries to intercept events from the chart internal iframe, which one failing on Chrome 60. Checking internals doesn't seem the best approach, instead we could consider that a chart has been resized after the resize method has been called and processed. So let's hook `Chart.resize` and callback once it's done.
@simonbrunel simonbrunel requested a review from etimberg July 26, 2017 08:29
@benmccann
Copy link
Contributor

Awesome! Thank you!!

@simonbrunel simonbrunel merged commit c6bda02 into chartjs:master Jul 26, 2017
@simonbrunel simonbrunel deleted the fix/unittests branch July 26, 2017 11:33
nagix pushed a commit to nagix/Chart.js that referenced this pull request Jul 28, 2017
The original implementation tries to intercept events from the chart internal iframe, which ones failing on Chrome 60. Checking internals doesn't seem the best approach, instead we could consider that a chart has been resized after the resize method has been called and processed. So let's hook `Chart.resize` and callback once it's done.
@davidalonso
Copy link

When will these changes be released? Our charts are not working on Chrome 60.

@etimberg
Copy link
Member

@davidalonso these specific changes do not affect charts, only our unit tests.

@simonbrunel simonbrunel added this to the Version 2.7 milestone Aug 14, 2017
yofreke pushed a commit to yofreke/Chart.js that referenced this pull request Dec 30, 2017
The original implementation tries to intercept events from the chart internal iframe, which ones failing on Chrome 60. Checking internals doesn't seem the best approach, instead we could consider that a chart has been resized after the resize method has been called and processed. So let's hook `Chart.resize` and callback once it's done.
exwm pushed a commit to exwm/Chart.js that referenced this pull request Apr 30, 2021
The original implementation tries to intercept events from the chart internal iframe, which ones failing on Chrome 60. Checking internals doesn't seem the best approach, instead we could consider that a chart has been resized after the resize method has been called and processed. So let's hook `Chart.resize` and callback once it's done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants