mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #45571 from nextcloud/fix/files-middle-click
This commit is contained in:
commit
6ec6c1fe4f
6 changed files with 13 additions and 9 deletions
|
|
@ -30,6 +30,7 @@
|
|||
<FileEntryPreview ref="preview"
|
||||
:source="source"
|
||||
:dragover="dragover"
|
||||
@auxclick.native="execDefaultAction"
|
||||
@click.native="execDefaultAction" />
|
||||
|
||||
<FileEntryName ref="name"
|
||||
|
|
@ -38,7 +39,8 @@
|
|||
:files-list-width="filesListWidth"
|
||||
:nodes="nodes"
|
||||
:source="source"
|
||||
@click="execDefaultAction" />
|
||||
@auxclick.native="execDefaultAction"
|
||||
@click.native="execDefaultAction" />
|
||||
</td>
|
||||
|
||||
<!-- Actions -->
|
||||
|
|
|
|||
|
|
@ -26,8 +26,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-->
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
:dragover="dragover"
|
||||
:grid-mode="true"
|
||||
:source="source"
|
||||
@auxclick.native="execDefaultAction"
|
||||
@click.native="execDefaultAction" />
|
||||
|
||||
<FileEntryName ref="name"
|
||||
|
|
@ -41,7 +42,8 @@
|
|||
:grid-mode="true"
|
||||
:nodes="nodes"
|
||||
:source="source"
|
||||
@click="execDefaultAction" />
|
||||
@auxclick.native="execDefaultAction"
|
||||
@click.native="execDefaultAction" />
|
||||
</td>
|
||||
|
||||
<!-- Actions -->
|
||||
|
|
|
|||
|
|
@ -207,7 +207,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
|
||||
|
|
|
|||
6
dist/files-main.js
vendored
6
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