Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions packages/fluent-editor/src/modules/link/modules/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -312,6 +313,8 @@ export class LinkTooltip extends BaseTooltip {

// @ts-expect-error
edit(mode: string = 'link', preview = null, range) {
console.log('1111 edit')

Comment on lines +316 to +317
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Remove debug console.log from edit() before merge.

Line 316 violates the current lint rule (no-console) and looks like leftover debug output.

🧹 Proposed fix
-    console.log('1111 edit')
-
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
console.log('1111 edit')
🧰 Tools
🪛 ESLint

[error] 316-316: Unexpected console statement. Only these console methods are allowed: warn, error.

(no-console)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/fluent-editor/src/modules/link/modules/tooltip.ts` around lines 316
- 317, Remove the leftover debug console.log from the edit() function in
tooltip.ts: delete the line console.log('1111 edit') (which violates the
no-console lint rule) and if you need to keep a message for debugging replace it
with the project's logger/debug utility (e.g., logger.debug or similar) or
remove it entirely before merging.

this.linkRange = range || this.quill.selection.savedRange
this.root.classList.remove('ql-hidden')
this.root.classList.add('ql-editing')
Expand Down
Loading