Skip to content

Commit

Permalink
Merge pull request #45984 from nextcloud/artonge/fix/click_while_rena…
Browse files Browse the repository at this point in the history
…ming

Don't trigger action when renaming
  • Loading branch information
artonge authored Jun 20, 2024
2 parents efe3244 + a6de33b commit 9c4b959
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions apps/files/src/components/FileEntryMixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ export default defineComponent({
this.actionsMenuStore.opened = opened ? this.uniqueId.toString() : null
},
},

isRenaming() {
return this.renamingStore.renamingNode === this.source
},
},

watch: {
Expand Down Expand Up @@ -208,6 +212,11 @@ export default defineComponent({
},

execDefaultAction(event) {
// Ignore click if we are renaming
if (this.isRenaming) {
return
}

// Ignore right click.
if (event.button > 1) {
return
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.

0 comments on commit 9c4b959

Please sign in to comment.