You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
2.30.0 regression: clipboard.insert of a hyperlink fragment inside an existing hyperlink creates a nested link (2.23.0 rejected it) #4151
In 2.30.0, clipboard.insert with a fragment that contains a hyperlink succeeds when the target caret is inside an existing hyperlink, and the result is a hyperlink nested inside another one. hyperlinks.list() then reports two overlapping links (the outer one and the inner one). Word has no nested hyperlinks, so the document can no longer round-trip cleanly.
In 2.23.0 (the version we ship) the same call was rejected with an overlap failure; we did not re-test 2.24–2.29, and hyperlinks.insert in 2.30.0 still rejects the same position with INVALID_CONTEXT. Only the clipboard path lets it through.
Expected (as in 2.23.0): the insert fails with an overlap failure, and the document is unchanged.
Actual (2.30.0): success: true, the text becomes alpXha beta gamma, and hyperlinks.list() returns the outer link over the whole range and a second link over the inserted X, inside it.
SuperDoc version
Works: 2.23.0. Broken: 2.30.0. (2.24–2.29 not tested.)
Browser
Chrome (Windows 10).
Additional context
We use the clipboard fragment to insert a link and its text in one transaction (it keeps the run formatting at the caret). On our side we now check hyperlinks.list({ within }) for the caret's block before inserting, but a check in the engine would protect every integration, including a plain paste of a link into a link.
changed the title [-]2.30.0 regression: clipboard.insert of a hyperlink fragment inside an existing hyperlink creates a nested link (2.29.0 rejected it)[/-][+]2.30.0 regression: clipboard.insert of a hyperlink fragment inside an existing hyperlink creates a nested link (2.23.0 rejected it)[/+]on Nov 12, 2026
Thanks, confirmed. This broke in 2.30.0 (2.29.0 still refuses it), and hyperlinks.wrap and hyperlinks.insert can nest links too. For your own check, count the link's start and end as inside it. Pasting at the very start is the worst case: the existing link text gets the new URL. We're working on an engine-side fix.
Activity
[-]2.30.0 regression: clipboard.insert of a hyperlink fragment inside an existing hyperlink creates a nested link (2.29.0 rejected it)[/-][+]2.30.0 regression: clipboard.insert of a hyperlink fragment inside an existing hyperlink creates a nested link (2.23.0 rejected it)[/+]caio-pizzol commentedon Nov 12, 2026
Thanks, confirmed. This broke in 2.30.0 (2.29.0 still refuses it), and
hyperlinks.wrapandhyperlinks.insertcan nest links too. For your own check, count the link's start and end as inside it. Pasting at the very start is the worst case: the existing link text gets the new URL. We're working on an engine-side fix.