Skip to content

Commit

Permalink
dumper: added cmd-click to open in editor
Browse files Browse the repository at this point in the history
On a Mac, Ctrl-click is equivalent to a right-click
  • Loading branch information
dg committed Oct 29, 2024
1 parent 2eae53a commit 2bd909c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Tracy/Dumper/assets/dumper.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ class Dumper {

document.documentElement.addEventListener('click', (e) => {
let el;
// enables <span data-tracy-href=""> & ctrl key
if (e.ctrlKey && (el = e.target.closest('[data-tracy-href]'))) {
// enables <span data-tracy-href=""> & ctrl or cmd key
if ((e.ctrlKey || e.metaKey) && (el = e.target.closest('[data-tracy-href]'))) {
location.href = el.getAttribute('data-tracy-href');
return false;
}
Expand Down

0 comments on commit 2bd909c

Please sign in to comment.