FIX: Check for link target attribute on link clink (#10923)

* FEATURE: Add ability to add target to link

This commit will add the ability for a link's target attribute to be specified.

Allowing`target: "_blank"` to work properly.
This commit is contained in:
Jordan Vidrine 2020-10-14 15:01:39 -05:00 committed by GitHub
parent f4f2e081d7
commit e8ebaad771
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,14 +97,18 @@ export default createWidget("link", {
); );
} }
} }
return result; return result;
}, },
click(e) { click(e) {
if (this.attrs.attributes && this.attrs.attributes.target === "_blank") {
return;
}
if (wantsNewWindow(e)) { if (wantsNewWindow(e)) {
return; return;
} }
e.preventDefault(); e.preventDefault();
if (this.attrs.action) { if (this.attrs.action) {