HOTFIX Composer cursor blink (#3983)

This commit is contained in:
Dat Dang
2025-08-28 08:42:48 +07:00
committed by GitHub
parent fce4e7d75f
commit ab55c9e96f
2 changed files with 9 additions and 0 deletions
@@ -211,6 +211,7 @@ class ComposerController extends BaseController
StreamSubscription<html.Event>? _subscriptionOnDragOver;
StreamSubscription<html.Event>? _subscriptionOnDragLeave;
StreamSubscription<html.Event>? _subscriptionOnDrop;
StreamSubscription<html.Event>? _subscriptionOnBlur;
StreamSubscription<String>? _composerCacheListener;
RichTextMobileTabletController? richTextMobileTabletController;
@@ -325,6 +326,7 @@ class ComposerController extends BaseController
_subscriptionOnDragOver?.cancel();
_subscriptionOnDragLeave?.cancel();
_subscriptionOnDrop?.cancel();
_subscriptionOnBlur?.cancel();
subjectEmailInputFocusNode?.removeListener(_subjectEmailInputFocusListener);
_composerCacheListener?.cancel();
_beforeReconnectManager.removeListener(onBeforeReconnect);
@@ -465,6 +467,11 @@ class ComposerController extends BaseController
mailboxDashBoardController.localFileDraggableAppState.value = DraggableAppState.inActive;
}
});
// https://github.com/flutter/flutter/issues/155265#issuecomment-2417101524
_subscriptionOnBlur = html.window.onBlur.listen((event) {
html.document.activeElement?.blur();
});
}
Future<void> _saveComposerCacheOnWebAction() async {
@@ -63,10 +63,12 @@ class RichTextWebController extends GetxController {
_updateBackgroundTextColor(settings);
_updateOrderList(settings);
_updateParagraph(settings);
editorController.setFocus();
}
void onEditorTextSizeChanged(int? size) {
_updateFontSize(size);
editorController.setFocus();
}
void _updateTextStyle(EditorSettings settings) {