forked from MapComplete/MapComplete
Actually open links in new tab
This commit is contained in:
parent
3e680bb63b
commit
0d4f2c9c36
1 changed files with 4 additions and 1 deletions
|
@ -1294,7 +1294,10 @@ export default class SpecialVisualizations {
|
||||||
tagSource: UIEventSource<Record<string, string>>,
|
tagSource: UIEventSource<Record<string, string>>,
|
||||||
args: string[]
|
args: string[]
|
||||||
): BaseUIElement {
|
): BaseUIElement {
|
||||||
const [text, href, classnames, download, ariaLabel] = args
|
let [text, href, classnames, download, ariaLabel] = args
|
||||||
|
if (download === "") {
|
||||||
|
download = undefined
|
||||||
|
}
|
||||||
const newTab = download === undefined && !href.startsWith("#")
|
const newTab = download === undefined && !href.startsWith("#")
|
||||||
return new VariableUiElement(
|
return new VariableUiElement(
|
||||||
tagSource.map(
|
tagSource.map(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue