Closed Bug 1679013 Opened 4 years ago Closed 2 years ago

Folder upload fields don't work on Firefox from Flathub

Categories

(Core :: Widget: Gtk, defect, P3)

Firefox 83
Desktop
Linux
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jgmcmuizpcyjjykxnj, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached image Actual result.png (deleted) —

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0

Steps to reproduce:

  1. Go to wetransfer.com
  2. Click on "Or select a folder"

Alternatively, you can also:

  1. Go to https://stackoverflow.com/questions/4008406/upload-a-whole-directory-through-an-html-form
  2. Click on the blue "Run code snippet" button
  3. Click on the "Browse..." button

Actual results:

A folder selector window opens, appearing to be in the directory ~/Desktop. However, the directory appear empty, while it is not in reality empty. The only directory which content can be displayed correctly is the downloads directory.

Expected results:

First, the folder selector window should have opened in the home directory, as it happens with a file selector window when uploading files instead of folders.

Then, the content of all directories should have been displayed when that directory is opened, rather than only the content of the download directory. The content to be displayed should be only the folders, maybe not individual files, as the purpose of the folder selector window is to select a folder rather than a file.

I have tried the same on Firefox ESR 78.5 from the Debian stable repo, and everything works as described in the expected results section.

Severity: -- → S3
OS: Unspecified → Linux
Hardware: Unspecified → Desktop

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Blocks: flatpak
Priority: -- → P3

Sharing directories with sandboxed applications only became available in xdg-desktop-portal 1.8+ (FileChooser API 3), for older versions Gtk will fallback to its internal directory chooser. As you described this will only display sandboxed directories as that is all that Firefox itself can see from within its sandbox.

Please test with the following software versions on the host:

  • Flatpak 1.8+
  • xdg-desktop-portal 1.8+
  • xdg-desktop-portal-gtk 1.8+ OR xdg-desktop-portal-kde 5.20.2+ (depending on the desktop environment)

If sharing works with the above software versions, then there is nothing for Mozilla to do here as the Firefox Flatpak cannot control the host-side versions of these software packages. Note that the current Ubuntu LTS version does not have the right versions of these packages and Ubuntu 20.10+ has the right versions for Gtk-based desktops, but not KDE (but they will be in 21.04). On the Debian-side, Debian testing is the the minimum Debian branch that has these.

Works for me with:
flatpak-1.14.1-2.fc37.x86_64
xdg-desktop-portal-1.15.0-4.fc37.x86_64
xdg-desktop-portal-gtk-1.14.1-1.fc37.x86_64

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: