Skip to content

Commit cf80b3a

Browse files
authored
Merge pull request #4 from stackb/ctrl-click-history
Only change history if normal click
2 parents 6fd4347 + 0a7a5af commit cf80b3a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

js/ui/history.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,12 @@ class History extends EventTarget {
6868
if (!strings.startsWith(hash, '#/')) {
6969
return;
7070
}
71-
e.preventDefault();
72-
// e.stopPropagation();
73-
74-
if (e.ctrlKey) {
75-
const href = anchor.href.replace("/#/", "/");
76-
window.open(href, "_blank");
71+
if (e.ctrlKey || e.metaKey) {
7772
return;
7873
}
74+
75+
e.preventDefault();
76+
7977
hash = hash.substring(2);
8078
//this.history_.replaceToken(hash);
8179
//this.replaceToken(hash);

0 commit comments

Comments
 (0)