diff --git a/CHANGELOG.md b/CHANGELOG.md index a592f32a..3373e292 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). -### 9.3.10 (2024-05-23) +### 9.3.11 (2024-05-23) - Fix chrome clear canvas issue - Typescript fixes diff --git a/src/Stage.ts b/src/Stage.ts index d06cb19a..4fe8a567 100644 --- a/src/Stage.ts +++ b/src/Stage.ts @@ -971,7 +971,7 @@ Factory.addGetterSetter(Stage, 'container'); // TODO: any other way to solve this issue? // TODO: should we remove it if chrome fixes the issue? if (Konva.isBrowser) { - window.addEventListener('focus', () => { + document.addEventListener('visibilitychange', () => { stages.forEach((stage) => { stage.batchDraw(); });