Firefox doesn't remember the last selected application to view a file of some content type in the "what do you want to do with this file" (always ask) dialog after saving it or opening it in Firefox
Categories
(Firefox :: File Handling, defect, P3)
Tracking
()
People
(Reporter: vincent-moz, Unassigned)
Details
When downloading a file of some content type, e.g. PDF, one may choose an application or save the file, in particular. But if one chooses to save the file, the application that was chosen previously is not remembered.
To reproduce on my machine (this depends on the installed applications):
- Open a URL corresponding to a PDF file, e.g. https://bugzilla.mozilla.org/attachment.cgi?id=9284102
The default application is "Inkscape (default)" in my case. - Instead of Inkscape, choose zathura (I suppose that the app does not matter for this test) and click OK.
- Close the PDF viewer (here, the zathura window).
- Open the same URL. One can see that zathura is still proposed as the default. Fine. But choose to save the file (or open it with Firefox) instead.
- Open the same URL. Now, in the "Open with" line, "Inkscape (default)" appears as the default. I would have expected "zathura".
Note: Inkscape is a very poor default as this is not a PDF viewer (though it can load PDF files with various drawbacks) and even fails silently in my case. But that's another issue.
hi, Vincent
I tried to reproduce this using latest Nightly 121.0a1 (2023-11-17) on Ubuntu 22.04, but I couldn't manage to recreate the situation.
Could you try a latest Nightly as well? Maybe a fresh profile could help.
Reporter | ||
Comment 2•9 months ago
|
||
To reproduce the bug with a new profile, one first needs to change "Open in Nightly" to "Always ask" for PDF in the Settings.
I can reproduce the issue with FF 119.0 (Debian package) and a new profile. Note: I've tested on a different machine, where the default application is Atril (I don't know why this is different), but the issue is the same vs the choice of zathura.
But I cannot reproduce the issue with Nightly 121.0a1 (2023-11-18) (64-bit) and a new profile.
Comment 3•9 months ago
|
||
As far as I can tell this dialog has always worked like this (or been a little more broken than it is today - the selected index in the dropdown used to be numerically hardcoded irrespective of the number of items... but anyway that was still only happening if "open" was the last-selected action).
https://searchfox.org/mozilla-central/rev/606cdd34860e42611fceba025314864cd293a43b/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs#823-828 only sets the selected item in the dropdown to something other than the OS default if the preferred action for this type of download is also "open with helper app". But it's not, because in step (4) it changed to "save to disk" or "open with Firefox". So we never change the selected helper app.
I'm not sure what it might break to always make this selection, but I imagine/hope not too much.
(In reply to Vincent Lefevre from comment #0)
Note: Inkscape is a very poor default as this is not a PDF viewer (though it can load PDF files with various drawbacks) and even fails silently in my case. But that's another issue.
Firefox just shows "default" but really it means "OS default". That is, we asked your OS and it claims this is the default viewer for PDFs. If you think this isn't a good app for this, probably best to change the OS default. If Firefox's idea of what the OS default is is wrong, that may be a (separate) Firefox bug (bug 1304650 is a somewhat well-known variation of this problem). In the latter case, probably best to file a separate bug with more specifics.
Description
•