diff --git a/core/lib/presentation/views/html_viewer/html_content_viewer_on_web_widget.dart b/core/lib/presentation/views/html_viewer/html_content_viewer_on_web_widget.dart index c39bd8bdc1..4aa93309f5 100644 --- a/core/lib/presentation/views/html_viewer/html_content_viewer_on_web_widget.dart +++ b/core/lib/presentation/views/html_viewer/html_content_viewer_on_web_widget.dart @@ -147,7 +147,7 @@ class _HtmlContentViewerOnWebState extends State { window.parent.addEventListener('message', handleMessage, false); window.addEventListener('click', handleOnClickLink, true); window.addEventListener('load', handleOnLoad); - window.addEventListener('beforeunload', (event) => { + window.addEventListener('pagehide', (event) => { window.parent.removeEventListener('message', handleMessage, false); }); diff --git a/pubspec.lock b/pubspec.lock index 3f1458becd..c35548cfeb 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1026,8 +1026,8 @@ packages: dependency: "direct main" description: path: "." - ref: memory_fixed_in_cnb - resolved-ref: "0292fa1b9c8bb018b910c1b8248be231b88a97b6" + ref: "bugfix/composer-reply-memory-leak" + resolved-ref: "7a20f8e924e403eb54f4a6177c3c8ecb0c7b3687" url: "https://github.com/linagora/html-editor-enhanced.git" source: git version: "2.5.1" diff --git a/pubspec.yaml b/pubspec.yaml index 359994adf1..ae2b850a29 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -60,7 +60,7 @@ dependencies: html_editor_enhanced: git: url: https://github.com/linagora/html-editor-enhanced.git - ref: memory_fixed_in_cnb + ref: bugfix/composer-reply-memory-leak jmap_dart_client: git: