Skip to content

Commit 7bcabfe

Browse files
committed
Open links in new tab in modal actions
Updated the link opening behavior in showCorrectAnswersModal, showModal, and showMapModal to use '_blank' as the default target, ensuring links open in a new browser tab instead of the current one.
1 parent 1ec341b commit 7bcabfe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.vitepress/theme/components/LinkGrid.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ function showCorrectAnswersModal(item) {
210210
focusCancel: true,
211211
preConfirm: () => {
212212
if (item.link) {
213-
window.open(item.link, item.target || "_self");
213+
window.open(item.link, item.target || "_blank");
214214
}
215215
},
216216
didOpen: () => {
@@ -331,7 +331,7 @@ function showModal(item) {
331331
focusCancel: true,
332332
preConfirm: () => {
333333
if (item.link) {
334-
window.open(item.link, item.target || "_self");
334+
window.open(item.link, item.target || "_blank");
335335
}
336336
},
337337
willOpen: () => {
@@ -398,7 +398,7 @@ function showMapModal(item) {
398398
focusCancel: true,
399399
preConfirm: () => {
400400
if (item.link) {
401-
window.open(item.link, item.target || "_self");
401+
window.open(item.link, item.target || "_blank");
402402
}
403403
},
404404
willOpen: () => {

0 commit comments

Comments
 (0)