From 492f25b0df04dd30a687a5b78a490549fb5c7c71 Mon Sep 17 00:00:00 2001 From: Felix Lee Date: Mon, 15 Jul 2024 08:29:15 +0800 Subject: [PATCH] fixed #1835 Embed Reloads on Cmd Key Press (#2013) --- lib/src/widgets/quill/text_line.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/src/widgets/quill/text_line.dart b/lib/src/widgets/quill/text_line.dart index e26e5575..14ae2a09 100644 --- a/lib/src/widgets/quill/text_line.dart +++ b/lib/src/widgets/quill/text_line.dart @@ -66,7 +66,11 @@ class _TextLineState extends State { if (_metaOrControlPressed != newValue) { setState(() { _metaOrControlPressed = newValue; - _richTextKey = UniqueKey(); + _linkRecognizers + ..forEach((key, value) { + value.dispose(); + }) + ..clear(); }); } }