Closed Bug 1377026 Opened 4 years ago Closed 4 years ago
cant save html as text with extension .t instead of .html on Mac Osx 10
.9 .5 version of Nightly
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:56.0) Gecko/20100101 Firefox/56.0 Build ID: 20170628192309 Steps to reproduce: When using This Frame -> Save Frame As... Dialog with Format: Text Files to save text/html content to some-name.t Actual results: The file is saved as some-name.t.html without asking as in previous versions of Nightly. Expected results: Dialog should pop-up and ask: You have used the extension “.t” at the end of the name. The standard extension is “.html”. [Use .html] [Cancel] [Use .t]
This behavior is defined by the Save As dialog provided by operating system, and Firefox does not have control over what the operating system is doing here. I think the logic followed by the OS X designers is that the Save As dialog only asks when the end of the file name looks like a known extension, for example ".txt", but does not ask otherwise, because it's likely the user might just be typing a file name containing dots near the end.
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
Then how come it worked fine in the older version on Mozilla?
I tested Firefox 54 and the behavior is the same. Can you provide details of which version of Firefox used to work as you expected, and test the result again? We haven't changed this code recently, so it's possible the behavior changed for you after an operating system update, rather than a Firefox update.
It worked without the question dialog up to version 50. Which still works on my mac using Mavericks. It stopped working with the question dialog after version 50, and I reported a bug then. It worked with the question dialog around version 54. It stopped working question dialog around mid july 2017 when i was using nightly. Im using Developer Edition now, and I think it should allow one to save the file with any extension. My os has not been upgraded from Mavericks so i dont think that is the problem. BTW I'm a C++ developer with a lot of experience writing UIs that interact with file dialogs and file saving. https://github.com/medusade
Thanks for the details. The bug you filed was bug 1320377, which correctly added the allowsOtherFileTypes option: https://developer.apple.com/documentation/appkit/nssavepanel/1526960-allowsotherfiletypes Since we are still passing the option to the dialog, I don't know what could have changed to cause what you observed in your configuration. Given that the new behavior of OS X is possibly better for most users with less technical knowledge about file naming and extensions, I don't think this bug is something that the teams at Mozilla should spend more time investigating right now. (In reply to medusade from comment #5) > BTW I'm a C++ developer with a lot of experience writing UIs that interact > with file dialogs and file saving. However, if you have a suggestion about how to fix this, I'd be interested in hearing it, as there might be some easy solution I'm missing.
Component: Downloads API → Widget: Cocoa
Product: Toolkit → Core
You need to log in before you can comment on or make changes to this bug.