#206 - Added middle click support to open in a new tab

This commit is contained in:
Simon Cambier
2023-03-09 21:40:12 +01:00
parent e611202da2
commit fc8c0763f0
4 changed files with 11 additions and 3 deletions

View File

@@ -160,7 +160,10 @@
index="{i}"
selected="{i === selectedIndex}"
on:mousemove="{_e => (selectedIndex = i)}"
on:click="{(evt) => openSelection(evt.ctrlKey)}" />
on:click="{evt => openSelection(evt.ctrlKey)}"
on:auxclick="{evt => {
if (evt.button == 1) openSelection(true)
}}" />
{/each}
{:else}
<div style="text-align: center;">

View File

@@ -283,7 +283,10 @@
selected="{i === selectedIndex}"
note="{result}"
on:mousemove="{_ => (selectedIndex = i)}"
on:click="{onClick}" />
on:click="{onClick}"
on:auxclick="{evt => {
if (evt.button == 1) openNoteInNewPane()
}}" />
{/each}
<div style="text-align: center;">
{#if !resultNotes.length && searchQuery && !searching}

View File

@@ -20,7 +20,8 @@
id="{index.toString()}"
selected="{selected}"
on:mousemove
on:click>
on:click
on:auxclick>
<div class="omnisearch-result__body">
{@html cleanedContent.replace(reg, highlighterGroups)}
</div>

View File

@@ -63,6 +63,7 @@
glyph="{glyph}"
id="{note.path}"
on:click
on:auxclick
on:mousemove
selected="{selected}">
<div>