From 2910fec8f1624758287cd1248f85186bc967bf74 Mon Sep 17 00:00:00 2001 From: Alan Date: Fri, 15 Nov 2024 15:01:27 -0600 Subject: [PATCH] Revert using modal hook (#2689) `@closed` hook gets called for all actions, whether user initiated or not. This is the source of auto-closing modals without user interaction reported in #3303 and #3519. While testing its effects, I also discovered other little issues but I have no clue how to Vue so I'll leave it to the big bois. 1. Moving a file to the same folder prompts a second modal. If you hit rename it doesn't ask you for the name, it just appends `(1)` and then complains that it cannot find the file if you try move again. 2. Creating a new file with the same name of an existing one does not issue a toast notification. That's because `files.ts` api does not return a properly formatted `StatusError` [here](https://github.com/filebrowser/filebrowser/blob/master/frontend/src/api/files.ts#L139). --- frontend/src/components/prompts/BaseModal.vue | 4 ---- 1 file changed, 4 deletions(-) diff --git a/frontend/src/components/prompts/BaseModal.vue b/frontend/src/components/prompts/BaseModal.vue index d92f0f73..5a494a71 100644 --- a/frontend/src/components/prompts/BaseModal.vue +++ b/frontend/src/components/prompts/BaseModal.vue @@ -3,7 +3,6 @@ class="vfm-modal" overlay-transition="vfm-fade" content-transition="vfm-fade" - @closed="layoutStore.closeHovers" :focus-trap="{ initialFocus: '#focus-prompt', fallbackFocus: 'div.vfm__content', @@ -15,7 +14,4 @@