Skip to content

Editor: typing right after a link extends the link #846

Description

@RitvikSardana

In the editor's LinkExtension, the Link mark inherits tiptap's default inclusive(), which returns this.options.autolink. Since frappe-ui sets autolink: true, the link mark is always inclusive. As a result, placing the cursor at the end boundary of a link and typing continues the link mark onto the new text.

Steps to reproduce:

  1. Type a URL followed by a space so it auto-links (e.g. https://example.com/ ).
  2. Type any text.

Expected: The new text is plain, outside the link.
Actual: The new text is absorbed into the link, e.g., https://example.com/newtext.

Notes: clearLinkOnBoundaryPlugin doesn't cover this. It clears stored marks only when the document has no active link at the cursor, but at an inclusive link's end boundary, the mark is active, so it bails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingeditortriagedSeen by barista

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions