KCarlile / guitar-diagrams-js

Open source JavaScript library for drawing guitar chords and scales on an HTML5 canvas.
https://demo.kcarlile.com/guitar-diagrams-js/
GNU General Public License v3.0
0 stars 0 forks source link

Canvas drawing disappears when tab loses focus for too long #1

Open KCarlile opened 5 months ago

KCarlile commented 5 months ago

Background

The drawing will disappear from the canvas if a tab is left without focus for too long. This could be related to Chrome dumping memory for that tab, but the rest of the page remains fine, so it's not like what I've seen with YouTube pages sitting for too long when Chrome dumps the memory for them. In that case, the entire page refreshes upon re-focus.

Acceptance Criteria

Approach

Notes

TBD

KCarlile commented 5 months ago

I noticed that there were some canvas.beginPath(); calls without a closing canvas.closePath(); call. I've now closed all of those and it seems like the canvas disappearing issue may be resolved. Those changes are in commit 02586d2.

Shoot, this issue is still happening. 😐