From 4c27414f09f6a887dc05935771cc89b076655064 Mon Sep 17 00:00:00 2001 From: lai Date: Sun, 20 Oct 2024 14:30:18 +0800 Subject: [PATCH] fix: block copy using settings button --- docs/CHANGELOG.md | 1 + src/components/utils/popover/popover-abstract.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 43fca419a..2b8c77fff 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -7,6 +7,7 @@ - `Fix` - Fix selection of first block in read-only initialization with "autofocus=true" - `Fix` - Incorrect caret position after blocks merging in Safari - `Fix` - Several toolbox items exported by the one tool have the same shortcut displayed in toolbox +- `Fix` - Fix issue where the block copy does not work when a block is selected using the settings button ### 2.30.6 diff --git a/src/components/utils/popover/popover-abstract.ts b/src/components/utils/popover/popover-abstract.ts index f04539546..afdaaa284 100644 --- a/src/components/utils/popover/popover-abstract.ts +++ b/src/components/utils/popover/popover-abstract.ts @@ -119,7 +119,9 @@ export abstract class PopoverAbstract this.nodes.popover.classList.add(css.popoverOpened); if (this.search !== undefined) { - this.search.focus(); + requestAnimationFrame(() => { + this.search?.focus(); + }); } }