Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions apps/files/src/components/FileEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -277,21 +277,21 @@ export default defineComponent({
},

created() {
useHotKey('Enter', this.triggerDefaultAction, {
stop: true,
prevent: true,
})
useHotKey('Enter', this.triggerDefaultAction)
},

methods: {
formatFileSize,

triggerDefaultAction() {
triggerDefaultAction(event?: KeyboardEvent) {
// Don't react to the event if the file row is not active
if (!this.isActive) {
return
}

event?.preventDefault()
event?.stopPropagation()

this.defaultFileAction?.exec({
nodes: [this.source],
folder: this.activeFolder!,
Expand Down
20 changes: 20 additions & 0 deletions cypress/e2e/files_sharing/public-share/header-menu.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,26 @@ describe('files_sharing: Public share - header actions menu', { testIsolation: t
]))
})

it('Can download all files with keyboard', () => {
cy.get('header')
.findByRole('button', { name: 'Download' })
.should('be.visible')
.focus()
cy.focused()
.type('{enter}')

const downloadsFolder = Cypress.config('downloadsFolder')
cy.readFile(`${downloadsFolder}/shared.zip`, null, { timeout: 15000 })
.should('exist')
.and('have.length.gt', 30)
.and(zipFileContains([
'shared/',
'shared/foo.txt',
'shared/subfolder/',
'shared/subfolder/bar.txt',
]))
})

it('Can copy direct link', () => {
// Check the button
cy.get('header')
Expand Down
4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.

Loading