Fix weird behavior on external Links in Sidebar

This commit is contained in:
Georg Krause 2021-12-11 20:04:17 +01:00 committed by JuniorJPDJ
parent 4c64694da2
commit 72950d52d3
1 changed files with 5 additions and 1 deletions

View File

@ -701,7 +701,11 @@ export default {
// works as expected
const link = $($el).closest('a')
const url = link.attr('href')
self.$router.push(url)
if (url.startsWith('http')) {
window.open(url, '_blank').focus()
} else {
self.$router.push(url)
}
$(self.$el).find(selector).dropdown('hide')
}
})