From dab934252b65040cf38faceb88574828a7f3aa63 Mon Sep 17 00:00:00 2001 From: wuyiping0628 <1106773985@qq.com> Date: Mon, 30 Mar 2026 20:38:02 -0700 Subject: [PATCH] fix: fix the issue where the pop-up box for modification operations does not appear when hovering over an image link --- packages/fluent-editor/src/modules/link/modules/tooltip.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/fluent-editor/src/modules/link/modules/tooltip.ts b/packages/fluent-editor/src/modules/link/modules/tooltip.ts index 2c70f1ad..7d160d5d 100644 --- a/packages/fluent-editor/src/modules/link/modules/tooltip.ts +++ b/packages/fluent-editor/src/modules/link/modules/tooltip.ts @@ -91,12 +91,13 @@ export class LinkTooltip extends BaseTooltip { if (isTooltipShow) { return } - if (this.isInputFocus) { this.save() } this.isHover = true - const linkNode = event.target as HTMLElement + const linkNode = event.target.tagName === 'IMG' + ? event.target.parentNode as HTMLElement + : event.target as HTMLElement const preview = LinkBlot.formats(linkNode) if (!preview || preview.startsWith('#')) { return @@ -312,6 +313,8 @@ export class LinkTooltip extends BaseTooltip { // @ts-expect-error edit(mode: string = 'link', preview = null, range) { + console.log('1111 edit') + this.linkRange = range || this.quill.selection.savedRange this.root.classList.remove('ql-hidden') this.root.classList.add('ql-editing')