From 87a0c271883ca4260dd97493a7f6292bd4615765 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Thu, 6 Aug 2026 09:19:40 +0200 Subject: [PATCH] Fixed file drops being ignored after closing a dialog with its own drop area --- .../Components/AttachDocuments.razor.cs | 5 +++++ .../Components/ReadFileContent.razor.cs | 8 +++++++- app/MindWork AI Studio/wwwroot/changelog/v26.8.1.md | 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/MindWork AI Studio/Components/AttachDocuments.razor.cs b/app/MindWork AI Studio/Components/AttachDocuments.razor.cs index 9309a5b7..4b4274fd 100644 --- a/app/MindWork AI Studio/Components/AttachDocuments.razor.cs +++ b/app/MindWork AI Studio/Components/AttachDocuments.razor.cs @@ -222,6 +222,11 @@ public partial class AttachDocuments : MSGComponentBase protected override void DisposeResources() { this.MediaTranscriptionService.StateChanged -= this.OnMediaImportStateChanged; + + // Release the drop area. Without this, drop areas below this one would count this component + // forever and would stop catching dropped files: + _ = this.MessageBus.SendMessage(this, Event.UNREGISTER_FILE_DROP_AREA, this.Layer); + base.DisposeResources(); } diff --git a/app/MindWork AI Studio/Components/ReadFileContent.razor.cs b/app/MindWork AI Studio/Components/ReadFileContent.razor.cs index 049e5b35..cf23d97c 100644 --- a/app/MindWork AI Studio/Components/ReadFileContent.razor.cs +++ b/app/MindWork AI Studio/Components/ReadFileContent.razor.cs @@ -174,10 +174,16 @@ public partial class ReadFileContent : MSGComponentBase this.MediaTranscriptionService.AcknowledgeDelivery(delivery); } - /// Unsubscribes from the singleton media service. + /// Unsubscribes from the singleton media service and releases the drop area. protected override void DisposeResources() { this.MediaTranscriptionService.StateChanged -= this.OnMediaImportStateChanged; + + // Release the drop area. Without this, drop areas below this one would count this component + // forever and would stop catching dropped files: + if (this.EnableDragDrop) + _ = this.MessageBus.SendMessage(this, Event.UNREGISTER_FILE_DROP_AREA, this.Layer); + base.DisposeResources(); } diff --git a/app/MindWork AI Studio/wwwroot/changelog/v26.8.1.md b/app/MindWork AI Studio/wwwroot/changelog/v26.8.1.md index f919c149..828e304a 100644 --- a/app/MindWork AI Studio/wwwroot/changelog/v26.8.1.md +++ b/app/MindWork AI Studio/wwwroot/changelog/v26.8.1.md @@ -3,6 +3,8 @@ - Added organization-configurable defaults and visibility controls for the Visual Briefing Assistant. - Added a share button for plugins, which uses the native share dialog on Windows and macOS. For Linux, we added an export option for plugins, which stores the plugin archive at a location of your choice. - Added an import button on the plugin page to install plugin archives directly from your files. +- Added the option to import plugins by dropping a plugin archive onto the plugin page. - Added the dedicated file extension `.mwplugin` for plugin archives. - Added an option for organizations to disable importing, sharing, and exporting plugins. +- Fixed dropping files after you closed a dialog that accepts files itself. Such a dialog takes over dropped files while it is open, but never handed that role back when you closed it. Afterwards, the chat and the assistants silently ignored dropped files until you switched to another page. Each time you opened such a dialog again, the problem got worse. - Upgraded dependencies to their latest versions to improve security and stability. \ No newline at end of file