mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-27 23:15:15 +08:00
fix(extension-link): fixes link going to wrong url (#4078)
Co-authored-by: Joe Narus <joe@status.cx>
This commit is contained in:
parent
a186ac40ee
commit
3053865475
@ -16,7 +16,7 @@ export function clickHandler(options: ClickHandlerOptions): Plugin {
|
||||
}
|
||||
|
||||
const attrs = getAttributes(view.state, options.type.name)
|
||||
const link = (event.target as HTMLElement)?.closest('a')
|
||||
const link = (event.target as HTMLLinkElement)
|
||||
|
||||
const href = link?.href ?? attrs.href
|
||||
const target = link?.target ?? attrs.target
|
||||
|
Loading…
Reference in New Issue
Block a user