Skip to content

Commit

Permalink
fix: Enable Ctrl/Cmd/Shift-Click for search results, closes #275
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Nov 7, 2024
1 parent 1f551d8 commit 353273a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion data_registry/templates/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
<script>
document.querySelectorAll('.clickable').forEach(div => {
div.addEventListener('click', event => {
window.location.href = div.querySelector('.click').href
// Stop "See details" from triggering a second event.
event.preventDefault()
open(div.querySelector('.click').href, event.ctrlKey || event.metaKey || event.shiftKey ? '_blank' : '_self')
})
})

Expand Down

0 comments on commit 353273a

Please sign in to comment.