Hitting Backspace can make Firefox switch to a previous page
Categories
(Firefox :: Keyboard Navigation, defect, P2)
Tracking
()
People
(Reporter: erwinm, Unassigned)
References
Details
Attachments
(1 obsolete file)
Comment 2•6 years ago
|
||
Comment 5•6 years ago
|
||
Comment 6•6 years ago
|
||
Updated•6 years ago
|
Comment 7•6 years ago
|
||
At this point, per bug 108816 comment 57 neither (pre-Chromium) Edge nor Chrome do this, so I think we should stop too. This is causing significant user confusion and dataloss, so we should probably reprioritize as well...
Markus, I'm told making this call would be in your wheelhouse. Could you take a look, please?
Comment 8•6 years ago
|
||
I fully agree with changing this shortcut behavior. The problems outweigh the benefits clearly as bug 108816 comment 57 describes.
What I am not clear about is if we need to provide an alternate shortcut to navigate back, and what that should be.
How would one naviate back using the keyboard without this shortcut? Maybe Shift-Backspace or similar might work, if needed.
(I do not think making the shortcut conditional on previous typing on the page is a good way to go, as this will not be apparent to the user, and add complexity to the behavior. Using a dialog will would also add some of that uncertainty on when it will show, and when not; and will interrupt peoples workflow - be it typing, or navigating back, as both would be blocked by it.)
Comment 9•6 years ago
|
||
Shift-Backspace is currently mapped to Forward, so it would be confusing to change that to Back.
Ctrl-Backspace doesn't seem to be mapped.
Back is already mapped to Alt + Left Arrow, but that's quite an awkward shortcut and can't be typed with one hand. Alt Gr + Left Arrow isn't mapped. Ctrl + Left Arrow would be easy to press.
Comment 10•6 years ago
|
||
On Mac, Cmd+Left is quite easy to press with one hand (using the right-hand Cmd key) and maps to "back".
On Windows, using right-Alt + Left-arrow should work, right?
I guess some keyboards have Alt Gr instead of right-Alt. We should consider making Alt Gr + left arrow Just Work, no?
Comment 11•6 years ago
|
||
I've never come across a keyboard with a right-Alt key, only Alt-GR, but that may be due to my locale (UK).
I agree adding support for Alt Gr + Left would be a good option. It's easy enough to press and people already know about Alt + Left.
Comment 12•6 years ago
|
||
(In reply to Boris Zbarsky [:bzbarsky, bz on IRC] from comment #10)
On Mac, Cmd+Left is quite easy to press with one hand (using the right-hand Cmd key) and maps to "back".
On Windows, using right-Alt + Left-arrow should work, right?
I guess some keyboards have Alt Gr instead of right-Alt. We should consider making Alt Gr + left arrow Just Work, no?
Sounds good.
Comment 13•6 years ago
|
||
OK. So looks like neither Edge nor Chrome support Shift+Backspace; I would argue we drop that too.
It looks like on Windows the relevant bits in browser-sets.inc are:
<key id="goBackKb" keycode="VK_LEFT" command="Browser:Back" modifiers="alt"/>
<key id="goForwardKb" keycode="VK_RIGHT" command="Browser:Forward" modifiers="alt"/>
and I'm a little surprised that "alt" here does not include Alt Gr. Maybe it just should. Masayuki, do you know anything about that end of things?
Comment 14•6 years ago
•
|
||
Some keyboards (such as what I am using) do not have right-Alt at all. Nor Alt-Gr. So it is really inconvinient to press Alt+Left for me.
But I'm fine with this change as long as browser.backspace_action
is left.
Comment 15•6 years ago
|
||
(In reply to Boris Zbarsky [:bzbarsky, bz on IRC] from comment #13)
OK. So looks like neither Edge nor Chrome support Shift+Backspace; I would argue we drop that too.
It looks like on Windows the relevant bits in browser-sets.inc are:
<key id="goBackKb" keycode="VK_LEFT" command="Browser:Back" modifiers="alt"/> <key id="goForwardKb" keycode="VK_RIGHT" command="Browser:Forward" modifiers="alt"/>
and I'm a little surprised that "alt" here does not include Alt Gr. Maybe it just should. Masayuki, do you know anything about that end of things?
If we treated AltGr exactly same as AltRight, some shortcut keys would work unexpectedly. E.g., if there is a shortcut key, Alt + A and AltGr + A produces a character on active keyboard layout. So, we shouldn't do such change.
On the other hand, it really sounds reasonable to map AltGr + LeftArrow to Browser:Back. So, I'd recommend that we/d make modifiers attribute of key element take "altgraph" value and add another key element for AltGr + LeftArrow.
Comment 16•6 years ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #14)
Some keyboards (such as what I am using) do not have right-Alt at all. Nor Alt-Gr. So it is really inconvinient to press Alt+Left for me.
Indeed. I don't know about other region's physical keyboards though, at least in Japan, there are a lot of notebook PCs which do not have AltRight key because PC vendors do not have enough space to put all keys of 106 keyboard due to a lot of IME specific keys.
Comment 17•6 years ago
|
||
Anyway, I bet we'll get a lot of complaints if we disable Backspace key for Browser:Back by default.
How about to map Backspace and Shift + Backspace to a function which shows dialog to confirm whether executing Browser:Back or Browser:Forward like when you type F7? Then, users who don't like these shortcut key mappings can disable them from the dialog easier than using about:config.
Comment 18•6 years ago
|
||
(In reply to Masayuki Nakano [:masayuki] (JST, +0900) from comment #17)
Anyway, I bet we'll get a lot of complaints if we disable Backspace key for Browser:Back by default.
I also wonder if we should get telemetry data for better understanding of the usage before really disabling it.
How about to map Backspace and Shift + Backspace to a function which shows dialog to confirm whether executing Browser:Back or Browser:Forward like when you type F7? Then, users who don't like these shortcut key mappings can disable them from the dialog easier than using about:config.
Hi Markus,
What do you think about Masayuki's idea? Thanks!
Comment 19•6 years ago
|
||
Anyway, I bet we'll get a lot of complaints if we disable Backspace key for Browser:Back by default.
I also wonder if we should get telemetry data for better understanding of the usage before really disabling it.
If we have reasonable worry that this might be broadly used and change will cause a lot of problems, we might want to do that.
(I do not think this is the case, esp. as we would only align with a behavior known from other browsers.)
How about to map Backspace and Shift + Backspace to a function which shows dialog to confirm whether executing Browser:Back or Browser:Forward like when you type F7? Then, users who don't like these shortcut key mappings can disable them from the dialog easier than using about:config.
Making each user decide, because we can not find an acceptable solution is not a good way to go. This is something we should consider if a very large portions of our users would want different behaviors, not necessarily when we talk about a very small subsets.
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Comment 20•4 years ago
|
||
Being stuck at home due to the pandemic, there is a lot more being done in web browser forms that ever before and having sometimes half an hour or more of work disappear because backspace is being interpreted as a back command is no longer tenable. Some places (on a site by site basis) have implemented a popup to prevent you from losing the text you have entered, but this is not universal.
The backspace key has been overloaded in such a way as to break many web applications. I realize this is a holdover from early IE, but it is long past the time when having this particular behavior is interacting badly with long-form text entry and applications on the internet (specifically those that break if you use the browser back). Since the back action is so potentially destructive, it needs to have an unambiguous activation criteria, one that is not overloaded with an action that you will often use exactly when you do not want to use back.
At the very least, this setting needs to be transparent to the user, not buried in about:config where many people don't even realize the setting exists. Ideally, the user should be asked about it during setup.
Comment 21•4 years ago
|
||
The suggestion above of making a universal and default-on popup that prompts the user to confirm they mean to leave a page with uncommitted text would also be helpful. Some pages implement this themselves, but as it is not a universal feature many do not.
How do we make progress on this? I don't understand why alt (the left one) plus left arrow isn't good enough. On mainstream keyboards, it seems to fit perfectly the ergonomic guidance that you're supposed to press the modifier with a different hand than the key being modified, so left hand for alt and right hand for left arrow should work. (I'm aware that there are ergonomic keyboards that put "left" alt and the left arrow on the same side of the keyboard.)
Comment 23•4 years ago
|
||
I don't know who is handling this...
I wonder, Alt
+ ArrowLeft
is also annoying shortcut if they use Linux or macOS and they (or their environment) map caret move or something to Alt
+ ArrowLeft
because our widget prefers it in editor, but won't disable it when non-editable element has focus. So, I think that the safest approach here must be just disabling the Backspace
key shortcut.
Comment 24•4 years ago
|
||
(And I don't know how to count "expected" page navigation by Backspace
with telemetry probes.)
So, I think that the safest approach here must be just disabling the
Backspace
key shortcut.
Let's do that. It's fairly obvious that Backspace
is a problem, and, as you say, we wouldn't know how to make a telemetry-based decision.
Comment 26•4 years ago
|
||
And the Backspace
as history navigation is handled by browser/
. So, out of scope of this component about that.
https://searchfox.org/mozilla-central/rev/3d39d3b7dd1b2be30692d4541ea681614e34c786/browser/base/content/browser.js#2765-2785
Updated•4 years ago
|
Reporter | ||
Comment 28•4 years ago
|
||
"On mainstream keyboards, it seems to fit perfectly the ergonomic guidance that you're supposed to press the modifier with a different hand than the key being modified"
That would be an accessibility barrier, especially if they can't be hit with the same hand, or are in awkward positions. Yes, sticky keys exist, but jumping across the keyboard increases the error rate and can worsen rsi.
Updated•4 years ago
|
To make progress on this, please address the review comments about telemetry at https://phabricator.services.mozilla.com/D80637
Updated•2 years ago
|
Comment 30•9 months ago
|
||
It looks like this is resolved in release 87 via disabling the backspace shortcut. https://www.mozilla.org/en-US/firefox/87.0/releasenotes#note-788542
Description
•