Form content lost due to an unexpected shortcut (should be Ctrl-W)
Categories
(Firefox :: Session Restore, enhancement)
Tracking
()
People
(Reporter: fabrice.salvaire, Unassigned)
References
Details
User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0
Steps to reproduce:
I was writing in a form.
Actual results:
I accidentally composed a shortcut (I guess Ctrl-W) and it closed the tab. The form content is lost.
Expected results:
It should be better protected. I suggest asking confirmation if a form is edited and to
improve form recovery, for example, copy the content in a clipboard.
See also https://addons.mozilla.org/en-US/firefox/addon/form-history-control/
Comment 1•3 years ago
•
|
||
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/96.0
Hi,
Thank you for opening this enhancement. I will set this as New and waiting for the developers opinion about it.
Could be similar to bug 48333.
Thanks for your report.
Comment 2•3 years ago
•
|
||
I believe our techniques for addressing this use case are:
- Undo-close-tab (Ctrl+Shift+T) to restore an inadvertently-closed tab
- Undo-close-window (Ctrl+Shift+N) to restore an inadvertently-closed window.
- "Restore Previous Session" if you happen to fully-quit Firefox by accident
All of these are available in the "History" menu (note, you need to press "alt" for the menus to show up, on Linux and Windows), and all of these should restore any form-field data that was entered when the tab/window/session was closed. (If they don't restore it, that's a bug and we should get that on file!)
I suspect/hope this^ addresses your use-case, and I think our UX team is hesitant to add modal dialogs and popups (and no other browser has one for this scenario), so I suspect we're unlikely to add a confirmation prompt to warn before letting the user close a tab.
In any case, I'll reclassify this under Session Restore which I think is where this form-field-saving behavior is managed. I suspect they may consider this "WONTFIX" given the above alternate ways of addressing this use-case, but I'll leave that decision to the folks who work on that area.
("Layout: Form Controls" is definitely the wrong component, since it's essentially just about the layout and appearance of form controls.)
Comment 3•3 years ago
|
||
I think there should be some way to disable useless and dangerous shortcuts like Ctrl-W = close window.
Comment 4•2 years ago
|
||
https://support.mozilla.org/en-US/kb/firefox-doesnt-save-web-form-entries implies that this should not be a problem when it comes to closing and reopening forms. Is this still an issue in a recent version? If it is, please provide exact steps to reproduce which leave zero room for any interpretation. Thanks!
Comment 5•2 years ago
|
||
Note that in today's web, a form is not the only web thing that can have unsaved state.
I would like to see a method to turn off Ctrl-W = close window, and instead process the Ctrl-W internal to the window.
Maybe I should open a new bug for that.
Comment 6•2 years ago
|
||
(In reply to Andre Klapper from comment #4)
https://support.mozilla.org/en-US/kb/firefox-doesnt-save-web-form-entries implies that this should not be a problem when it comes to closing and reopening forms.
That page seems to be about autocomplete, which is a way that Firefox saves form data for possible reuse/completion after it's been submitted.
This bug is about content that has not-yet-been-submitted (when the tab is inadvertently closed). That data doesn't go into autocomplete, but it does get restored if you restore the tab/window/session per comment 2.
(In reply to Rob Janssen from comment #5)
I would like to see a method to turn off Ctrl-W = close window, and instead process the Ctrl-W internal to the window.
Maybe I should open a new bug for that.
That seems like a reasonable request, and a new bug would be good, thanks! (Note that Ctrl+W is actually just close-tab, and Ctrl-Shift-W is close-the-whole-window.)
(I'm not sure we'd want to extend this to remapping or disabling any arbitrary keyboard shortcuts; but opting out of the window/tab-closing shortcuts seems like a reasonably targeted request.)
Comment 7•2 years ago
|
||
Created bug 1827006
Description
•