From c9f3781a8d990826f6a21d8414802004566dcb71 Mon Sep 17 00:00:00 2001 From: Mirone Date: Thu, 22 Aug 2024 16:17:56 +0800 Subject: [PATCH] fix: tooltip plugin will make the editor auto focused (#1478) --- packages/plugins/plugin-tooltip/src/tooltip-provider.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/plugins/plugin-tooltip/src/tooltip-provider.ts b/packages/plugins/plugin-tooltip/src/tooltip-provider.ts index 675d6cdc389..5b850a04275 100644 --- a/packages/plugins/plugin-tooltip/src/tooltip-provider.ts +++ b/packages/plugins/plugin-tooltip/src/tooltip-provider.ts @@ -54,6 +54,7 @@ export class TooltipProvider { this.#debounce = options.debounce ?? 200 this.#shouldShow = options.shouldShow ?? this.#_shouldShow this.#offset = options.offset + this.element.dataset.show = 'false' } /// @internal @@ -151,6 +152,8 @@ export class TooltipProvider { /// Hide the tooltip. hide = () => { + if (this.element.dataset.show === 'false') + return this.element.dataset.show = 'false' this.onHide()