Save As dialog: pressing ENTER doesn't always work
Categories
(Core :: Widget: Win32, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox122 | --- | fixed |
People
(Reporter: doron.feldman, Assigned: rkraesig)
References
Details
Comment 1•16 years ago
|
||
Comment 2•16 years ago
|
||
Comment 4•15 years ago
|
||
Updated•15 years ago
|
Comment 6•14 years ago
|
||
Comment 8•12 years ago
|
||
Comment 10•12 years ago
|
||
Comment 11•12 years ago
|
||
Reporter | ||
Comment 12•12 years ago
|
||
Comment 13•11 years ago
|
||
Comment 14•11 years ago
|
||
Comment 15•11 years ago
|
||
Comment 16•11 years ago
|
||
Comment 17•11 years ago
|
||
Comment 18•11 years ago
|
||
Comment 19•10 years ago
|
||
Comment 20•10 years ago
|
||
Comment 21•10 years ago
|
||
Comment 22•10 years ago
|
||
Comment hidden (advocacy) |
Comment 24•9 years ago
|
||
Updated•9 years ago
|
Comment 30•9 years ago
|
||
Reporter | ||
Comment 31•9 years ago
|
||
![]() |
||
Updated•9 years ago
|
Comment 32•9 years ago
|
||
Comment 33•9 years ago
|
||
Reporter | ||
Comment 34•9 years ago
|
||
Comment 35•9 years ago
|
||
Comment 36•8 years ago
|
||
Comment 37•8 years ago
|
||
Comment hidden (advocacy) |
Updated•6 years ago
|
Comment 39•6 years ago
|
||
Comment hidden (advocacy, off-topic) |
Comment hidden (advocacy) |
Comment 42•4 years ago
|
||
It seems, Chrome creates a separate process every time for "Save image as" window - it can be easily seen in Windows Task manager and in Chrome's internal task manager. Firefox does not. Chrome does not have this bug. Firefox does. So, maybe if Firefox developers put "Save image as" window into a separate process, it will fix this HORRIBLE bug. Fix this ASAP, please!
Also, I'm not sure but it seems, Enter key does not work (for the first time it is pressed) only in cases when user starts typing a new file name IMMEDIATELY after choosing "Save image as" in image's context menu, while that window is still being painted/animated, possibly only when folder already contains other images that start with the same letters and thus autocomplete list appears briefly while entering new name.
Comment 43•4 years ago
|
||
Also, maybe this bug is related to bugs like this one https://bugzilla.mozilla.org/show_bug.cgi?id=431544 (there are several other bugs about “save as” dialog as well)
Or, if you think that it is Windows’s fault, maybe file a bug to Microsoft? But quick google search shows that ONLY FIREFOX has this bug. Firefox is the first and pretty much the only relevant result.
Comment 44•4 years ago
|
||
Other erratic behaviors, including this bug, are listed here https://bugzilla.mozilla.org/show_bug.cgi?id=442218
Comment 45•4 years ago
|
||
Note that bug https://bugzilla.mozilla.org/show_bug.cgi?id=431544 , judging from its description, is ALWAYS reproducible, and it supports my observation that something that makes Enter not work (a focus event back to the web page) happens a short time after opening “Save as” dialog. So, now you have a way to debug this, and therefore, a way to fix this.
Comment 46•4 years ago
|
||
A couple of excerpts from bug https://bugzilla.mozilla.org/show_bug.cgi?id=442218 :
“This window will be out of focus so the keyboard can't be used to navigate in it but there's worse: ALT-TAB wont bring you to it but bring another application in focus instead of firefox, so only using ALT-TAB twice will finally bring you inside that window.”
<…>
“Hit [ENTER]: Normally, this should confirm the file name, close the dialog, and save the file. More often than not, [ENTER] will only rehighlight the whole text in the "file name" entry box. You have to hit [ENTER] a number of random times to finally make the dialog box go away.”
The last paragraph describes exactly the behavior of this bug, therefore I conclude that the cause of this bug definitely is a temporary loss of focus of ”Save as” window during its opening.
Comment 47•4 years ago
|
||
And after further testing, right now, on Windows 10, I'm pretty sure that this temporary loss of focus of ”Save as” window during its opening is happening ONLY WHEN user starts typing a new VERY SHORT (like "01", "02", "03" - no more than two letters) file name IMMEDIATELY (with very little time passed) after choosing "Save image as" in image's context menu and presses Enter IMMEDIATELY AFTER THAT.
If user inputs new file name immediately after choosing "Save image as" in image's context menu, BUT WAITS before pressing Enter, bug does not manifest itself. So pressing Enter early is key for making "Save as" window lose focus temporarily.
The above is 100% consistently repeatable for me. Chrome and Photoshop do not have this bug at all, no matter how quickly I enter new file name and press Enter.
Comment 48•4 years ago
|
||
After even further testing, I think it became even more clear what's going on:
For approximately two seconds (I guess it depends on how fast user's PC is, mine is old) after clicking "Save image as" in context menu, Firefox's main window border is still colored, which means it's still active. Save as dialog is being painted. But in spite of that, letter presses are already being cached for input in file name field which is not yet drawn on screen. Enter key is also probably being cached, not as a command to "Save as" window's "Save" button, but as an indication that file name entry is completed, that's why new file name is selected when "Save as" window is finally drawn.
If Enter key is not pressed during these two seconds, new file name is not selected.
If Enter key is pressed after Firefox's main window border becomes desaturated (by that time, "Save as" window is already fully drawn on screen and is active), Enter key works as it should - it saves the file.
Disabling windows animations in System properties control panel does not speed up things.
Comment 49•4 years ago
|
||
The visual difference between Chrome and Firefox seems to be that
Chrome: 1) loses focus of main window 2) paints "Save image as" window 2) gains focus on "Save as" window
Firefox 1) paints "Save image as" window 2) waits a little after that 3) loses focus of main window 4) gains focus on "Save image as" window
Comment 50•4 years ago
|
||
After even further testing I found out that RARELY (maybe once in 20 pictures saved) Enter key does not work even when it is pressed much later after opening "Save as" dialog (and entering new file name). But I hope I brought something new to think about, this bug seems to have something to do with loss of focus on "Save as" dialog. I wasn't able to reproduce bug https://bugzilla.mozilla.org/show_bug.cgi?id=431544 (though I wasn't trying hard and I didn't use screen reader or debugging tools), but it has never really been fixed, so maybe somewhere there lies an answer, or in the piece of code where "Save as" dialog is initialized and called (compare to Chrome's sequence of events), or creating a separate process for "Save as" dialog is the solution, like in Chrome.
Comment 51•4 years ago
|
||
Also, I used high-speed camera on my phone and I saw that for a brief moment in time (several frames on 60 Hz display, actually) on Firefox both "Save as" dialog and main Firefox window have focus at the same time (a second after choosing "Save image as" in image's context menu, while "Save as" dialog window is already on screen, its contents being painted). I saw that on Chrome and Notepad that doesn't happen. Maybe this should not be happening, maybe this is a race condition? Or maybe this is not a good way to judge transition of focus.
Comment 52•4 years ago
|
||
(This can be better seen when windows animations are disabled in Control panel)
Reporter | ||
Comment 53•4 years ago
|
||
Dmitriy, I don't know if the problem you are describing is related to this one. This bug happens when the "Save As" dialog is definitely in focus. You can even type in a new file name. When pressing ENTER, the dialog responds. The problem is that the response is not always the correct response. Instead of closing the window and saving the file, sometimes the response is rather to select the file name in the edit box (if it isn't already selected) and keep the dialog open. This can sometimes happens even after pressing ENTER multiple times.
This is still happening in Firefox version 89.0 . The last version before this bug appeared was Firefox version 2.0 . My 12 year old daughter wasn't even born yet.
Comment 54•4 years ago
|
||
Yes, this is exactly the same bug I’m describing. What I did yesterday is I found a way to kind of reproduce it every time (instead of sometimes): if user inputs new short file name immediately after selecting “save image as” and then immediately presses Enter, it leads to selecting the file name in the edit box and keeps the dialog open, and sometimes (rarely) even multiple presses of Enter don’t close the dialog. And in comment 50 I found out that sometimes this bug is still happening even if user inputs file name when waiting longer than two second (the same way it was happening before, when I reported this bug 5 years ago in comment 24). In these first two seconds (when bug is guaranteed to happen) the focus is still on main Firefox window, so that means this bug is happening because periodically “Save as” dialog loses focus (also see comment 46 - it describes a bug when focus is lost from that dialog and user has to alt+tab back to it, with exactly the same symptoms as this bug). I attempted to give programmers a better idea of what’s going on, because they sort of indicated in comment 30 that they don’t know what to do. And Chrome’s spawning a new process just for that dialog is important, I think. A potential solution.
Comment 55•4 years ago
|
||
And bug in comment 45 (it’s a different bug of course) has tools listed (screen reader, process debugger) that are worth trying to see if my assumption about periodical loss of focus is correct.
Comment 56•4 years ago
|
||
So, it of course looks visually that focus is on “Save as” dialog all the time, but is it really? Maybe at times it isn’t (100% repeatability of this bug’s symptoms in the first two seconds when focus is still on main window indicates so), and key presses are buffered, then inserted as string when focus is back to “Save as” dialog? And Enter inserted as part of string from buffer is interpreted as “end of line” symbol instead of command to save file?
Reporter | ||
Comment 57•4 years ago
|
||
If the dialog responds to ENTER, how can it not be in focus? Note that it responds to all keys correctly, except the ENTER key. I really don't see how this could be a focus issue.
Comment 58•4 years ago
|
||
Well, maybe I’m wrong, I’m just speculating, attempting to get things moving with this bug somehow. “Save as” dialog doesn’t exist during the first two seconds after selecting command in context menu. Input field for file name doesn’t exist yet. Main window is still in focus. Yet when “Save as” window finally appears, all the keys pressed when it didn’t exist get entered in file name field. So it looks like they are buffered.
Comment 59•4 years ago
|
||
And “Save” button in “Save as” dialog doesn’t exist as well during the first two seconds, that might be why Enter key is not functionally tied to it during this time when “Save” button doesn’t exist OR exists but not in a window that is in focus when Enter key is pressed. Just guessing.
Comment 60•4 years ago
|
||
https://www.ibm.com/docs/en/host-on-demand/12.0?topic=SSS9FA_12.0.0/com.ibm.hod.doc/help/keybuffer.html
“Keystroke buffering, also referred to as type-ahead support, enables you to enter keystrokes in an emulator session even when input is inhibited. Keystrokes are buffered when input is inhibited and processed later when the input-inhibited condition is removed.”
https://community.progress.com/s/article/17748
“ What is the type-ahead keyboard buffer maximum on Windows?”
“The keyboard type-ahead buffer can contain a maximum of 16 characters.”
Comment 61•4 years ago
|
||
We are not the only ones suffering from this bug:
https://superuser.com/questions/890736/disabled-enter-key-in-save-image-dialog-sometimes-in-firefox
https://superuser.com/questions/1184923/firefox-save-file-dialog-requires-multiple-enter-key-presses-how-do-i-disable-t
These are top results in Google search request “enter key selects file name in save dialog”. No other program has this bug. Rewrite the code responsible for saving completely if you can’t figure out where the problem is, please. Page rendering improvements and conformance to new web standards will not stop users leaving Firefox if Firefox fails at basic things for decades. Try saving a gallery of 50 images with renaming them sequentially to “01”, “02”, “03” (for preserving original order when sorting in folder), and you’ll feel HUGE PAIN because of non-working Enter button.
Comment 62•4 years ago
|
||
Also, I used AccEvent debugging tool as suggested in https://bugzilla.mozilla.org/show_bug.cgi?id=431544 and the only thing different between image saved with Enter key bug and without the bug appears to be the order of events probably fired at creation of interface elements of Save as dialog. When I pressed Enter and it selected file name instead of closing the dialog, no event fired at all. Total number of logged events is exactly the same in both buggy and non-buggy run.
Also, I ensured that blue outline that represents focus on UI element, is present in the dialog both on file name field and Save image button, in both buggy and non-buggy cases. So, no difference there.
Comment 63•4 years ago
|
||
The bug exists in Windows 11 as well, easily reproducible in VMware Workstation (which means it's hardware agnostic). In the 4th image that I was saving with renaming, pressing Enter selected file name. So we're stuck with it for a very very long time if Firefox developers won't fix it. https://imgur.com/a/9AtmIO8
Comment 64•3 years ago
|
||
I've been struggling with this problem for at least 7 years through all the Firefox versions (then and now), the problem seems to be that when you have a web page open and click on a download link, Firefox calls the "Save As" or "Save File" Windows common control and that in many instances the user can see that the "Save" button is highlighted (meaning it's the default button in the dialog) and you can press the "Enter" key or alternately the "Alt-S" shortcut and the dialog fails to respond to either of these keys. As many people have indicated, with the dialog open you can press "Enter" or "Alt-S" ten or twenty times and it fails to respond and the only way to continue is to use the mouse to actually click the "Save" button which always works. I have noticed that in many instances if you've hit "Enter" 10 or more times and then try "Alt-S" or vice versa maybe one out of five times that works for some reason. The thing that I have to wonder is if the bug is not in Firefox but in the Windows Common Control save file dialog.
Comment 65•3 years ago
|
||
Still not solved after 15 years. I still have to hit enter multiple times until finally accepts and saves the file. This happens more often if one of your downloads is an .exe file or your are saving in a folder with some .exe files (like GOG offline installer downloads), but it also happens with "normal" folders.
Persistent from Windows Vista up to Windows 11 (with all in-between), and from Server 2008 to Server 2022.
Updated•3 years ago
|
Comment 66•3 years ago
|
||
The severity field for this bug is relatively low, S3. However, the bug has 5 duplicates and 13 votes.
:spohl, could you consider increasing the bug severity?
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Comment hidden (advocacy) |
Comment 68•2 years ago
|
||
(In reply to Chris LeFebvre from comment #64)
I've been struggling with this problem for at least 7 years through all the Firefox versions (then and now), the problem seems to be that when you have a web page open and click on a download link, Firefox calls the "Save As" or "Save File" Windows common control and that in many instances the user can see that the "Save" button is highlighted (meaning it's the default button in the dialog) and you can press the "Enter" key or alternately the "Alt-S" shortcut and the dialog fails to respond to either of these keys. As many people have indicated, with the dialog open you can press "Enter" or "Alt-S" ten or twenty times and it fails to respond and the only way to continue is to use the mouse to actually click the "Save" button which always works. I have noticed that in many instances if you've hit "Enter" 10 or more times and then try "Alt-S" or vice versa maybe one out of five times that works for some reason. The thing that I have to wonder is if the bug is not in Firefox but in the Windows Common Control save file dialog.
On Windows 11 with the release of Firefox 112.0.2 (64-bit), I tried to reproduce the bug multiple times, saving EXE files from https://ftp.mozilla.org/pub and 4.9+ Gb files from the https:// wiki.ubuntuusers.de as well as saving multiple images (i.e. the one posted in the comment 63 - https://imgur.com/a/9AtmIO8), by pressing ctrl + S
to save the entire page with an image, pressing shift + F10
to open context menu > Save Link As...
, then by renaming the file quickly or slowly, by leaving the filename the same and prompting to overwrite it, by saving it in the different folders, by pressing Enter
and Alt + S
with the file name selected or not, with NVDA screen reader running and without any assistive technology - neither of these reproduced the bug for me.
The only one time the behavior of the dialog was not behaving purely as expected was in the case of quickly renaming an image to a one letter-long reused title (s
in this case) and pressing Enter
: in this case, the sound of a dialog to overwrite the file (Confirm Save As
) was played and the dialog did not appear visually before I quickly pressed Enter
again (activating No
button of the confirmation dialog). The focus was returned to the Enter name of file to save to...
save file dialog, as expected.
Maybe a new set of clear steps to reproduce with a specific URL(s) used would help to reproduce and investigate this bug, if it still exists.
Reporter | ||
Comment 69•2 years ago
|
||
Still Happening. For example, I started downloading the .exe files in random subdirectories under https://ftp.mozilla.org/pub/firefox/releases/100.0b1/win64/ and almost every file I selected required one or two extra "Enter" hits.
Running on 112.0.2 (64-bit) Windows 10 Pro
Comment hidden (advocacy) |
Assignee | ||
Comment 71•2 years ago
|
||
(In reply to Dozza from comment #69)
Still Happening. For example, I started downloading the .exe files in random subdirectories under https://ftp.mozilla.org/pub/firefox/releases/100.0b1/win64/ and almost every file I selected required one or two extra "Enter" hits.
Running on 112.0.2 (64-bit) Windows 10 Pro
I have been able to very intermittently (much less than 1/4 of the time) reproduce this on the same version. So far I have only seen it with the .exe
files; I have been unable to repro using the .msi
files located alongside them. @Dozza, is that also true for you?
Assignee | ||
Comment 72•2 years ago
•
|
||
Strike that; not 30 seconds later I had it happen with an .msi file.
(It's perhaps also worth noting that I don't experience this in daily use -- I don't think I've ever seen it happen outside of this test case. Which is odd, since there doesn't seem to be anything particularly unusual about it.)
Comment 73•2 years ago
|
||
I just had this bug start happening to me only within the last few days. At first I thought it was a Windows 10 issue since I had recently made some registry changes to disable the A.I. that Microsoft recently added to Office. But I've been able to save images using the Enter key in other apps, so I did a test. I tried saving using Save Image As in Firefox to see if the issue was intermittent (it's not). I then opened Edge and did a Save Image As using the same website, image, and destination folder. No issues. Before I ran this test I had already used the Windows DISM tools to scan and fix system issues, used CCleaner to delete all garbage and fix registry issues, closed all open tabs (I had ~160), and restarted my computer multiple times. Therefore, I feel pretty confident in saying that this is solely a Firefox issue.
Comment 74•2 years ago
|
||
Since I am seeing this for more than ten years now and some here still say "cannot reproduce" I decided to record a nice little video on how annoying this is: https://youtu.be/Xp3pnMKQx6E
I am using Carnac to show my key presses so you can literally see what I am doing. Have fun watching! I cut it down to make it short and spare you the blah blah, I hate overly long videos with unnecessary blah blah blah. Bug first appearance at about 0:55, and today the record on "how many times I have to press enter" is seven, recorded in that video.
It does not only happen in Firefox, it happens in Seamonkey as well and in Waterfox and probably all other Mozilla-Engine based browsers. One of those many never-fixed-bugs which drives users away.
OS: From Windows 7, 8.0, 8.1, nearly all Win10 versions and Windows 11 now - this Firefox problem never went away. Hardware ranging from i7-2500k/i7-4960x/Ryzen 2700x/Ryzen 3900x/Ryzen 5950x (I spare you the older machines down to AMD 80286..). The Ryzen CPUs got ECC memory from me, the previous CPUs obviously not.
Comment 75•2 years ago
|
||
This is still a problem in 2023. For this problem, it seems to happen as long as the url shows in the status bar. Mouse over a link, URL appears, click save as, save dialog pops up. If the URL is still disappearing, Save button does not work. If it takes long enough for the Save dialog to populate, the URL fades away.
I suspect the problem is Firefox eating window messages while the URL fades, but I haven't experimented further. Being patient and letting the URL go away results in 100% success rate. Being quick on the ENTER key is basically a race condition.
Comment 76•2 years ago
|
||
Testing suggests this may be fixed after bug 1837079 lands.
Assignee | ||
Comment 77•2 years ago
•
|
||
(In reply to Dan Mitt from comment #75)
This is still a problem in 2023. For this problem, it seems to happen as long as the url shows in the status bar. Mouse over a link, URL appears, click save as, save dialog pops up. If the URL is still disappearing, Save button does not work. If it takes long enough for the Save dialog to populate, the URL fades away.
I suspect the problem is Firefox eating window messages while the URL fades, but I haven't experimented further. Being patient and letting the URL go away results in 100% success rate. Being quick on the ENTER key is basically a race condition.
The bad news is that I can confirm it's not this. When running in a build of Firefox with debug instrumentation, the URL disappears in only slightly more than the usual amount of time, but the Save button may not start responding to the Enter key until several seconds later. (And of course the debug instrumentation doesn't seem to show anything that lines up with Enter-key presses, or else this would be much easier to fix.)
The good news is that, as :gcp's implied above...
(In reply to Dmitriy from comment #42)
It seems, Chrome creates a separate process every time for "Save image as" window - it can be easily seen in Windows Task manager and in Chrome's internal task manager. Firefox does not. Chrome does not have this bug. Firefox does. So, maybe if Firefox developers put "Save image as" window into a separate process, it will fix this HORRIBLE bug. Fix this ASAP, please!
... I've been working on doing exactly this, and it does seem to fix it, or at least work around it. Even in the dog-slow debug build, an out-of-process file picker responds to the first press of Enter.
Note that bug 1837079 won't fix it immediately: the current plan is to leave it disabled in Release builds for a time while we gather stability and performance data in Firefox Nightly. If you're fine with running technically-experimental code, though, you'll be able to set a pref to turn it on anyway.
Comment 78•2 years ago
|
||
Assigning to :rkraesig based on the OOP file picker work that may influence the severity of this bug.
Comment 79•1 year ago
|
||
I'm assuming this is related - when saving an image, and a file by that name exists, most of the time focus returns to the filename for a quick edit.
Sometimes it does not.
I'll try nightly for a bit. It's rare, and I don't save that many images, so it will be hard to tell if it is fixed. If not I'll do a separate bug that that. But it does suggest that windows messages like WM_FOCUS are being eaten or misdirected somewhere.
Assignee | ||
Comment 80•1 year ago
|
||
Good news, everyone!
The patch for bug 1858225 — which merely moves the file-picker to a different thread, rather than a different process — also appears to fix this.
I've tested it in a local debug build with no optimizations (which reproduced the bug more consistently), and not seen it; and likewise for the current Nightly build.
The async part will ride the trains immediately, rather than waiting on further analysis, so it'll go out for sure in v122. (The out-of-process file-picker may be delayed until v123.)
Closing as RESOLVED FIXED.
Updated•1 year ago
|
Description
•