mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
fix(files): also trigger new tab on file name middle click
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
This commit is contained in:
parent
b9857b9a7f
commit
63ca843105
6 changed files with 12 additions and 8 deletions
|
|
@ -47,6 +47,7 @@
|
|||
<FileEntryPreview ref="preview"
|
||||
:source="source"
|
||||
:dragover="dragover"
|
||||
@auxclick.native="execDefaultAction"
|
||||
@click.native="execDefaultAction" />
|
||||
|
||||
<FileEntryName ref="name"
|
||||
|
|
@ -55,7 +56,8 @@
|
|||
:files-list-width="filesListWidth"
|
||||
:nodes="nodes"
|
||||
:source="source"
|
||||
@click="execDefaultAction" />
|
||||
@auxclick.native="execDefaultAction"
|
||||
@click.native="execDefaultAction" />
|
||||
</td>
|
||||
|
||||
<!-- Actions -->
|
||||
|
|
|
|||
|
|
@ -43,8 +43,7 @@
|
|||
:aria-hidden="isRenaming"
|
||||
class="files-list__row-name-link"
|
||||
data-cy-files-list-row-name-link
|
||||
v-bind="linkTo.params"
|
||||
@click="$emit('click', $event)">
|
||||
v-bind="linkTo.params">
|
||||
<!-- File name -->
|
||||
<span class="files-list__row-name-text">
|
||||
<!-- Keep the displayName stuck to the extension to avoid whitespace rendering issues-->
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@
|
|||
:dragover="dragover"
|
||||
:grid-mode="true"
|
||||
:source="source"
|
||||
@auxclick.native="execDefaultAction"
|
||||
@click.native="execDefaultAction" />
|
||||
|
||||
<FileEntryName ref="name"
|
||||
|
|
@ -58,7 +59,8 @@
|
|||
:grid-mode="true"
|
||||
:nodes="nodes"
|
||||
:source="source"
|
||||
@click="execDefaultAction" />
|
||||
@auxclick.native="execDefaultAction"
|
||||
@click.native="execDefaultAction" />
|
||||
</td>
|
||||
|
||||
<!-- Actions -->
|
||||
|
|
|
|||
|
|
@ -224,7 +224,8 @@ export default defineComponent({
|
|||
},
|
||||
|
||||
execDefaultAction(event) {
|
||||
if (event.ctrlKey || event.metaKey) {
|
||||
// if ctrl+click or middle mouse button, open in new tab
|
||||
if (event.ctrlKey || event.metaKey || event.button === 1) {
|
||||
event.preventDefault()
|
||||
window.open(generateUrl('/f/{fileId}', { fileId: this.fileid }))
|
||||
return false
|
||||
|
|
|
|||
4
dist/files-main.js
vendored
4
dist/files-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files-main.js.map
vendored
2
dist/files-main.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue