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

Canvases for palette colors and tool options become blank #341

Open
1j01 opened this issue May 22, 2024 · 0 comments
Open

Canvases for palette colors and tool options become blank #341

1j01 opened this issue May 22, 2024 · 0 comments
Labels

Comments

@1j01
Copy link
Owner

1j01 commented May 22, 2024

On Chrome Version 125.0.6422.60 (Official Build) (64-bit) on Windows 11, the tool options (brushes etc.) and color palette canvases are disappearing. This seems to happen when the window is minimized.

Weirdly, the image data is still there, and can be shown again with:

for (const canvas of document.querySelectorAll("canvas")) {
    const ctx = canvas.getContext("2d");
    ctx.putImageData(ctx.getImageData(0, 0, canvas.width, canvas.height), 0, 0);
}

This is in contrast to the browser clearing the canvas and image data entirely as in #24 although it may be related. I suspect both as being buggy performance optimizations in Chrome. In that case I can detect it by the image data being zeroed out, but not in this bug.

Also note how the main canvas is left in tact here:

image

Switching themes fixes it, as it causes things to re-render.

@1j01 1j01 added the bug label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant