From 559d94d7aafd4111950850d5b0b946205411ac61 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Thu, 9 Apr 2026 14:05:40 +0200 Subject: [PATCH 1/2] Specifically allow application/x-moz-file as a drag and drop valid case If this was not added on 6.0 I could not drag and drop a file into phpMyAdmin. I have no idea why on 5.2 it still worked. Pull-request: #20189 Ref: #18557 Signed-off-by: William Desportes --- js/src/drag_drop_import.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/js/src/drag_drop_import.js b/js/src/drag_drop_import.js index 3f9d1a38c2..f714529a21 100644 --- a/js/src/drag_drop_import.js +++ b/js/src/drag_drop_import.js @@ -218,6 +218,14 @@ var DragDropImport = { return false; } + // Firefox native file drag - allow it + // "Firefox also adds a non-standard text item of type application/x-moz-file + // containing the full path of the file on the user's file system. Unless within + // privileged code (such as an extension), its value is the empty string." + if ($.inArray('application/x-moz-file', types) >= 0) { + return true; + } + // Firefox native image drag - exclude it if ($.inArray('application/x-moz-nativeimage', types) >= 0) { return false; From 84c971aaa36a46e685a1a468a7bff34a87fd6f87 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Thu, 9 Apr 2026 14:09:03 +0200 Subject: [PATCH 2/2] Fixup of: Specifically allow application/x-moz-file as a drag and drop valid case I did a mistake in my logic Pull-request: #20189 Ref: #18557 Signed-off-by: William Desportes --- js/src/drag_drop_import.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/drag_drop_import.js b/js/src/drag_drop_import.js index f714529a21..8d7674ad88 100644 --- a/js/src/drag_drop_import.js +++ b/js/src/drag_drop_import.js @@ -222,7 +222,7 @@ var DragDropImport = { // "Firefox also adds a non-standard text item of type application/x-moz-file // containing the full path of the file on the user's file system. Unless within // privileged code (such as an extension), its value is the empty string." - if ($.inArray('application/x-moz-file', types) >= 0) { + if ($.inArray('application/x-moz-file', types) > 0) { return true; }