From 9da4f6330d7074838deded79a80de9e89155ab7f Mon Sep 17 00:00:00 2001 From: Michael Allen Date: Sat, 11 Feb 2023 12:34:16 -0800 Subject: [PATCH] update clipboard status prior to showing selected text overlay (#1096) --- lib/src/widgets/text_selection.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/src/widgets/text_selection.dart b/lib/src/widgets/text_selection.dart index dd6d6c18..74bcf55f 100644 --- a/lib/src/widgets/text_selection.dart +++ b/lib/src/widgets/text_selection.dart @@ -83,6 +83,11 @@ class EditorTextSelectionOverlay { }) { final overlay = Overlay.of(context, rootOverlay: true); + // Clipboard status is only checked on first instance of ClipboardStatusNotifier + // if state has changed after creation, but prior to our listener being created + // we won't know the status unless there is forced update i.e. occasionally no paste + this.clipboardStatus.update(); + _toolbarController = AnimationController( duration: const Duration(milliseconds: 150), vsync: overlay); }