-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Responsive resizing does not work sometimes ( hidden Iframe bug) #3521
Comments
Can you create a jsfiddle (or similar) that reproduce your issue? Listening Note that in 2.3, resizing vertically doesn't work but that's fixed in the upcoming version 2.4. |
@simonbrunel I think, chartjs has got a conflict with material design html5 template that we use Please, whatch my video: https://yadi.sk/d/sdHQaV1MxiF9Z |
Hard to say what's going on without a way to debug it :\ Is that page online, can you share it? |
@simonbrunel Try to minimize browser width, and return width to normal size. |
I see, the canvas and iframe elements are detached and re-attached to the DOM when your responsive layout changes, making the iframe content to reload (see the browser short loading state) and removing the "resize" even handler. Will include a fix in version 2.4. |
@simonbrunel |
That's explained in my first reply! We plan to change that method in 2.5 with divs (and scroll events) instead of an iframe. |
chart.js Version: 2.3.0
Browsers: Chrome (51 fnd other), Firefox and other.
When we use ChartJS whis gridstack.js and bootstrap, sometimes we have an error whis hiddenIframe resizing. Sometimes resizing does not work.
What about replace this:
(hiddenIframe.contentWindow || hiddenIframe).onresize = function() { if (callback) { return callback(); } };
on this:
(window).onresize = function() { if (callback) { return callback(); } };
Its line 5776 chart.js
When we use
window
everithyng work fine.The text was updated successfully, but these errors were encountered: