From 60c4b31714b03a66c4deb741a7c580d97d9fe3ce Mon Sep 17 00:00:00 2001 From: dab246 Date: Mon, 30 Sep 2024 09:55:40 +0700 Subject: [PATCH] Remove `FocusNode` unnecessary Signed-off-by: dab246 --- lib/src/widgets/html_editor_widget_web.dart | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/src/widgets/html_editor_widget_web.dart b/lib/src/widgets/html_editor_widget_web.dart index 358169e3..b581a840 100644 --- a/lib/src/widgets/html_editor_widget_web.dart +++ b/lib/src/widgets/html_editor_widget_web.dart @@ -66,7 +66,6 @@ class _HtmlEditorWidgetWebState extends State { StreamSubscription? _editorJSListener; StreamSubscription? _summernoteOnLoadListener; static const String _summernoteLoadedMessage = '_HtmlEditorWidgetWebState::summernoteLoaded'; - final _focusNode = FocusNode(); @override void initState() { @@ -675,9 +674,7 @@ class _HtmlEditorWidgetWebState extends State { ), ); - return Focus( - focusNode: _focusNode, - child: child); + return child; } /// Adds the callbacks the user set into JavaScript @@ -815,7 +812,6 @@ class _HtmlEditorWidgetWebState extends State { c.onEnter!.call(); } if (data['type'].contains('onFocus')) { - _focusNode.requestFocus(); c.onFocus!.call(); } if (data['type'].contains('onUnFocus')) { @@ -995,7 +991,6 @@ class _HtmlEditorWidgetWebState extends State { void dispose() { _editorJSListener?.cancel(); _summernoteOnLoadListener?.cancel(); - _focusNode.dispose(); super.dispose(); } }