revert [gtk] Default the file dialog operation to cancelling the operation.

While this could be an annoying default for users expecting fast-track
dialog operations with hitting enter, it avoids potential social
engineering attacks and unintended file operations.
This commit is contained in:
Moonchild committed 2026-06-30 13:53:18 +00:00
1 parent 8a2a9ead92
commit ce61835a81
1 file changed
+1 -2
+1 -2
View File
@@ -465,9 +465,8 @@ nsFilePicker::Open(nsIFilePickerShownCallback *aCallback)
}
}
// Default to cancelling the operation.
if (GTK_IS_DIALOG(file_chooser)) {
gtk_dialog_set_default_response(GTK_DIALOG(file_chooser), GTK_RESPONSE_CANCEL);
gtk_dialog_set_default_response(GTK_DIALOG(file_chooser), GTK_RESPONSE_ACCEPT);
}
int32_t count = mFilters.Length();