mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 05:03:39 +08:00
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:
parent
f4f2e081d7
commit
e8ebaad771
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user