[Memory leak] Handle dispose in MobileEditorWidget

This commit is contained in:
Dang Dat
2025-12-23 13:56:52 +07:00
committed by Dat H. Pham
parent a286dd5dd8
commit a31898185e
2 changed files with 27 additions and 9 deletions
+7 -3
View File
@@ -48,8 +48,11 @@ class HtmlUtils {
editor.parentNode.replaceChild(newEditor, editor);''',
name: 'unregisterDropListener');
static registerSelectionChangeListener(String viewId) => (
script: '''
static ({String name, String script}) registerSelectionChangeListener(
String viewId,
) =>
(
script: '''
let lastSelectedText = '';
const sendSelectionChangeMessage = (data) => {
@@ -149,7 +152,8 @@ class HtmlUtils {
}
});
''',
name: 'onSelectionChange');
name: 'onSelectionChange',
);
static const collapseSelectionToEnd = (
script: '''