Skip to content

Commit 75a4130

Browse files
authored
[fix] <a> tag in footer to open in a new tab (sveltejs#155)
If the content of the sidebar is long enough the users might misclick and choose the *Edit this page* link instead of the *Next: Lesson* link. By doing so, the link will open within the user lesson tab and even if they go back to their previous tab the progress will be lost. This patch makes the <a> tag on the footer open in a new tab, so if the user misclicks on the link they can close it and continue normally.
1 parent 587907e commit 75a4130

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/routes/tutorial/[slug]/Sidebar.svelte

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@
7373
</div>
7474

7575
<footer>
76-
<a class="edit" href="https://github.com/sveltejs/learn.svelte.dev/tree/main/{exercise.dir}">
76+
<a
77+
target="_blank"
78+
rel="noreferrer"
79+
class="edit"
80+
href="https://github.com/sveltejs/learn.svelte.dev/tree/main/{exercise.dir}"
81+
>
7782
Edit this page
7883
</a>
7984
</footer>

0 commit comments

Comments
 (0)