-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Charts disappear when changing tabs in Arc browser #1598
Comments
It happens in Chrome, though less frequently, the issue is in 4.1.4. The version 4.1.3 is fine. |
This appears to be a chrome bug (see https://issues.chromium.org/issues/328755781). As a temporary workaround, you could use the following: document.addEventListener('visibilitychange', () => {
const canvasElements = document.querySelectorAll('.tv-lightweight-charts canvas');
Array.from(canvasElements).forEach((el) => {
const ctx = el.getContext('2d');
ctx.save();
ctx.fillStyle = "rgba(0, 0, 0, 0)";
ctx.fillRect(0, 0, 1, 1);
ctx.restore();
});
}); or just call const chart = createChart('container');
// ...
document.addEventListener('visibilitychange', () => chart.applyOptions({})); I'll look into a patch release for the library which will include a workaround for this issue. |
https://issues.chromium.org/issues/328755781#comment95
Seems like this fix won't be required since Chrome is going to push a server-side fix. |
It seems to be happening when opening a chart on Arc and switching tabs. This is also happening on the official demo page (see attached video)
Screenshots:
Video.Compressor.May.18.mp4
The text was updated successfully, but these errors were encountered: