From 842d4618f821bc05cfca5d775c5c9feb8a74febf Mon Sep 17 00:00:00 2001 From: water <672684719@qq.com> Date: Tue, 11 Aug 2026 20:13:47 +0800 Subject: [PATCH] fix: prevent inline toolbar from closing when clicking on form controls inside it When clicking on a form control (e.g. ) inside the Inline Toolbar popover, the selection is lost, which triggers a selectionchange event. The selectionChanged handler was unconditionally closing the Inline Toolbar when there is no selection range, even if the user is interacting with a form control inside the toolbar. Fix: check if the active element is inside the Inline Toolbar before closing it. If the user is focused on a form control inside the toolbar, keep it open. Fixes #2985 --- src/components/modules/ui.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/modules/ui.ts b/src/components/modules/ui.ts index d8dc37989..400625c65 100644 --- a/src/components/modules/ui.ts +++ b/src/components/modules/ui.ts @@ -861,10 +861,19 @@ export default class UI extends Module { /** * If there is no selected range, close inline toolbar * + * But do not close it if the user is interacting with a form control + * inside the Inline Toolbar popover (e.g. clicking on an or