Hacker News new | past | comments | ask | show | jobs | submit login
Why Does Backspace Go Back A Page? (ux.stackexchange.com)
81 points by AndyBaker on March 22, 2014 | hide | past | favorite | 80 comments



It's just terrible UI design on so many levels.

* It uses a text-input key in a modal way, when no other unmodified text keys are used modally in a web browser.

* Shifting between modes can happen inexplicitly and unintentionally.

* It's potentially destructive.

Add this all up and you have a recipe for users unintentionally and unexpectedly losing data. That's bad enough on its own.

The fact that the justification for it appears to be "because somebody made a poor UI decision 20 years ago and people don't like change" is inexcusable.


The space key is also used modally, to scroll the page down. This creates an issue on some web games and video players: If the game/player element is not focused, and space is pressed (with the intention of pausing/playing the video, or making the game character jump) the page will scroll down.

Some websites, like Github and Facebook also use input keys modally. I'll very often trigger some UI function by mistake when starting to type a message if the text field is not focused for some reason.


The arrow keys also do the same. And scroll is modal in that a scrolling content area gets the scroll first, but when it reaches the end, the parent then gets it (i.e. the page).


The arrow keys are explicitly navigation keys. I specified text input keys for a reason.

I had overlooked space; probably because the behavior is non-destructive.


> "because somebody made a poor UI decision 20 years ago and people don't like change"

And now they did a poor UI decision by making a swipe gesture go back

Which would be ok if it wasn't for the fact that sometimes when scrolling (on anything that has 2 dimensions) you will accidentally swipe back.


I use it all the time in Safari and love it. In Chrome it's less obvious when it is being triggered though.


Yes, in Safari there's a more obvious visual indication.

I suspect that back and forth in Safari may be non-destructive as well (though I can't confirm this right now)

One of the things that makes it easy to swipe back by mistake is the apple trackpad, so I suspect Safari developers are aware of this and added the indication


> I suspect that back and forth in Safari may be non-destructive as well (though I can't confirm this right now)

I just tried swiping back and forth with this text in the Hacker News comment box and it didn't lose the content. I'm pretty sure I've had issues before, I think in relation to pages loaded by POST.


How can you accidentally put a third finger down to swipe back, if you're scrolling with two fingers?


In Chrome on OS X, either two or three fingers will both scroll and change page.


I chuckle when people boldly declare something as poor UX without acknowledging that there could be more than one true way. We have different kinds of computers, different kinds of users, and different preferences. It's subjective.

> Add this all up and you have a recipe for users unintentionally and unexpectedly losing data.

That sounds like a fixable problem, and one worth fixing no matter what your shortcuts are. I hit back and then forward in Firefox, and look, all the text I wrote is still there.


>That sounds like a fixable problem, and one worth fixing no matter what your shortcuts are. I hit back and then forward in Firefox, and look, all the text I wrote is still there.

You're operating under the assumption that a text box is the only form of data that a user can lose by navigating away from a page. It isn't.


Actually the text box was an example of data my browser does store right now.

What form of data is one the browser can have but not keep after you navigate back?


You're very right. The turn signal doubles as the ejector-seat button. This needs fixing.


This was particularly infuriating back when browsers would commonly lose input state when going back then forward. For years, long after that was resolved, I still wrote anything longer than a single sentence in notepad.

Even if this is kept for inertial reasons (I do make use of it on a trackpad myself), I think as soon as you interact with any kind of text input it should be disabled for the page.


To give fair warning, it seems Safari on iOS 7 will randomly refresh text boxes on pages when you jump to other tabs to cut and paste information. It has bit me a few times and I now wait until I'm at my PC to write any reference laden post or form where information comes from multiple tabs.


Stack (Overflow|Exchange) put up a modal dialog if you started writing something and then change the page. Which is annoying when you just want to navigate away because you're not going to answer anymore, but in most cases solves this problem quite nicely.

Disabling the key under certain circumstances is usually a support nightmare when trying to explain people that »Backspace goes back to the previous page, except there is text in any input field on the page that you entered, in which case it does nothing. Oh, but the back button in the toolbar still works, as does the side button on your mouse.« (The same problem with disabled UI controls that usually do not say why they are disabled. Some things, e.g. Copy being disabled when there is no selection, are easy enough to figure out but others not so much at times.)


On Firefox:

  Go to about:config
  Search for browser.backspace_action
  Set it to 2
All fixed. It is disabled by default in Linux, but someone surely made a mistake and forgot to turn it off by default in Windows in some misunderstood concept of 'compatibility'.


Firefox follows conventions of the various platforms, even for things like menus. In Linux, "Options" is under the "Preferences" menu, while on Windows it's under "Tools".


In Linux, "Options" is called "Preferences" and is under the "Edit" menu, while on Windows it's under "Tools".


The whole premise is focusing on a symptom rather than the real issue. I happen to love backspace, because having to press a chord, half of which is requires my hand to move the arrow keys, is a major cache-miss for an action as common as navigating back.

But none of that even matters. The real question is:

Why do browsers not have an interface for configuring keyboard shortcuts yet?

And while they're at it, add an interface to customize whether or not JavaScript in web pages can override certain shortcuts. Not being able to rebind C-w, C-t, C-S-t, space, backspace, etc. has been a huge frustration for ages. One of the reasons I use Firefox is that it has a robust enough extension mechanism to support add-ons like KeySnail, but the fact the key rebinding isn't core functionality is just embarrassing.


Yeah I think it's a huge problem that javascript/the DOM allow a page to have shortcuts and control over page navigation. This is so wrong IMO; the user agent should be in control. Because I am in control of my user agent.


Then it gets really hard to implement your own text box, if you cannot catch things like Backspace, etc. I think those things are relics because the web evolved rather haphazardly from a document display environment to an application development environment.


That "evolution" should not have happened. Maybe there's no sense in lamenting it now, except I think it's worth recognizing that we're still very much in need of both a reasonable web-like document display environment and a reasonable cross-platform untrusted-application-sandbox-VM environment.

As for implementing your own textbox that catches backspace, that's a great example of the type of thing that web pages should not be doing. User agents should be responsible for the existence of text-entry fields, that way they can serve the text-entry needs of the user. Different users construct text differently. Also the consistency of UI of allowing users to know how a textbox works (because it's not redefined for each site) is a UI achievement that we have now lost.


> Why do browsers not have an interface for configuring keyboard shortcuts yet?

Have you ever used Opera? This is in Opera 9 of 7 years ago:

http://i62.tinypic.com/35014du.png

(Edit: apparently it's been removed as of version 15; sad but not too surprising. What drew me to Opera was this and the Quick Preferences menu: http://www.h-online.com/security/imgs/46/3/7/5/6/9/6/op9_f12... --- I don't think I've seen any other browser since that offers this level of control in a stock install.)


I like this feature actually, because I'm used to it. It's simpler and quicker than using Alt + ←. I'm kinda pissed when this behavior is overridden (ie. Google Search). To be honest, this:

"On some pages (but not all) when I want to erase the last few characters I just typed, I tap Backspace several times. Tap tap tap. And then, lo-and-behold, my browser is leaving the page I was on and going back in the tab history."

never happened to me, and I'm really wondering how the asker manages to lose the focus on a text field while he types.


It happens to me when I accidentally hit my laptop trackpad while I'm typing.


I'm the asker. You must be one of those cursor focus savants. Do you actually get any work done? If so, are you a super genius whose brain always has extra clock cycles to check that the cursor is blinking next to where you're intending to erase? Or are you a very slow user? Or do you not bother fixing your mistakes when you type?


It wasn't a rhetorical question and I didn't want to sound aggressive, I'm sorry you took it that way. I didn't even think of the touchpad issue for example.


I suspect the most common cause is a wrist or thumb brushing against a laptop trackpad.

Or perhaps when switching between windows or tabs.


For disabled users backspace to go back is tremendously useful. On keyboards with Alt Gr, pressing Alt + Left Arrow requires pressing down keys with both the left and right hand simultaneously. It's not possible if one of your arms is paralyzed. Targetting the back button (which btw, is getting smaller and smaller i newer browsers) with the mouse to click can also be a very time consuming task if you are suffering from involuntary shakes.

Some people actually surf using tab to focus links, then click with return and goes back with backspace. For them removing the backspace as back function is a big step backwards (haha) in usability. Yes, one could argue that they should just install vimperator and some other addons to make the browser usable with their particular disability. But most handicapped users are just as clueless as normal ones and have no idea how to customize their software.


I agree that backspace is useful as a back button (I use it that way), and also that there should be an option to change the setting (although, on which the default should be, I cannot decide).

But wasn't StickyKeys (and other assistance-related settings) created to fix the keyboard modifier problem for users with low mobility?


Following this logic, all the options in the Accessibility settings panel should be on per default. Which I guess would make some sense, but I can see why they're not.


Not only for disabled users, unless you consider users with RSI or related injuries disabled. The backspace to go back and the space key to scroll are extremely convenient to browse the web with an ergonomic Kinesis Advantage keyboard. They are the biggest keys on the left and right, directly accessible with your thumbs. Removing this behaviour in a browser would make browsing less usable - although it's possible to remap keys on the Kinesis Advantage.


On the plus side, it's a large key that does not require simultaneous key presses: holding down multiple keys at the same time is not user friendly, especially for noobs.

The backspace frequently has a backwards arrow printed on it, so symbolically it feels right.

Personally I find web pages that break common shortcuts, and navigation paradigms more irritating. Google+ changes the behaviour of CTRL+PGUP/PGDOWN, some sites hijack the spacebar (normally I use for paging), some sites hijack CTRL+CLICK that I use to open links in new tabs.

I never hear people bemoaning the use of the Home key to go to the home page, and its different behaviour in text input areas. But I can appreciate some people don't like it how the controls appear to change, depending on what you are doing, it's far from obvious for some people.

I find The issue with text controls in browsers, is one of focus, thinking that you are in text area, when you aren't etc. The browsers could really help here, by making it really obvious which form element has the focus. It's doubly annoying when you are have focus on a flash component, and none of your keyboard shortcuts feel like they work. I'm a keyboard fan, but really without having some exotic setup, you are reliant upon the mouse with the mainstream OSs because of irritations like these. Which is really irritating for me when I'm trying to do simple things with just the keyboard sitting on the sofa with a computer connected to the TV.


> holding down multiple keys at the same time is not user friendly, especially for noobs.

The problem is that "noobs" generally don't care about keyboard shortcuts at all, especially if there's already a large button in the top left of the screen (or the bottom of the device) that does exactly what they want to do. The only keyboard shortcuts my father remembers, for example, are Ctrl+C and Ctrl+V, and he's been using computers for 25 years.

Keyboard shortcuts need to be simple enough to be memorable, but also not too simple so that you don't press it unintentionally. A single key that is also commonly used for a different purpose doesn't seem to fit that criterion.


I"d hardly say hitting one key with your finger is a keyboard shortcut. Some noobs, hate the pointer when they first encounter it, and will avoid it if possible.


I'm not sure if it still does, but twitter used to hijack F5 so you can't reload the page. Rather annoying when it has been sitting in the background, and hasn't updated.


To avoid loss of form input, there are several auto-save-to-localstorage solutions like http://garlicjs.org/. Just add data-persist="garlic" to the form tag and everything is saved until successfully submitted.


Which is also potentially annoying behaviour - often you don't want the state to be saved. We could solve it adding a 'reset' button to our forms. Haha - do browsers still support those?


Only if they're within 3 pixels of a 'submit' button.


Has it actually annoyed you or have you heard of someone being annoyed by it? Because I can't imagine it being annoying. Most of the time, saving form input is desired. The few times where it's not, it's easily solved by one of the many ways to remove all the text.


It has, yeah. Wasn't it behaviour added to Firefox once some years ago? I recall a situation where my less technical other half was struggling to submit a form because of this behaviour. Granted, it was due to a poor implemention that didn't support two dropdowns where one depended on the other, but it was confusing and annoying.

As a developer it's annoying because it slows down testing - again edge case, but I've seen it before, and it annoyed me.

If it was the standard behaviour and all controls were sensitive to it, that would probably be different.

There's also the security aspect to keep in mind. So now when someone comes back to a page on your machine, might they see something you didn't want them to see?


I use a Firefox add-on that does this for every form:

https://addons.mozilla.org/en-US/firefox/addon/lazarus-form-...


Gotta disagree here. I never have a problem with this useful long-standing feature.


As another one who uses this feature often, I can remember how I discovered it a long time ago: accidentally pressing it once on a page and thinking "oh, that's useful", then regularly using it after that.

On the other hand, I'd rather Alt+Left be disabled inside text inputs, as I have quite a few times accidentally went back while trying to move the cursor.

The odd thing is that this shortcut is not mentioned in the Back button's tooltip of neither Firefox, IE, Opera, nor Chrome.


Agreed. Not only have I never had a problem with it, but I actively use it (and its friend shift+backspace) every day.


I get really frustrated with the comments that say "but backspace doesn't do that when you're in a text control". To me thats completely missing the point. Can anyone explain why anyobe would make such a comment? Is it just pedantism with a lack of understanding of the bigger picture? These type of comments drive me crazy, and I only ever see them in programmer fora.


I think it's because that particular statement is the foundation of the complainant's argument against the shortcut. And for someone who never experiences this failure scenario, the vitriol against the backspace key is nigh on impossible to understand.


I must say I've never had a problem with the feature, and it's been highly useful to me. It must be something of a blind spot to some set of people, because IIRC it has never even occurred to me until now that it might constitute bad UX. In retrospect, though, I can see how it can be problematic.


That's understandable if they use a desktop PC most of the time, and a lot of people fall into that group.

Even with the clever "palm detection" (or whatever it's called) feature that is built into most trackpads nowadays, the very location of the trackpad on most laptops makes it too easy to click on something you didn't mean to. It's much easier to keep the focus in a <textarea> if you just type on a standalone keyboard and the mouse is 14 inches away.


This could be it. I mostly use desktops. When I use a laptop I always use a connected mouse because trackpads are an impediment to me. So to reproduce this frustration you'd need to accidentally move the cursor away from the text control and then accidentally tap the trackpad again to invoke single click and move the focus away. I can see how this might seem like the browser has a mind of its own.


Programmer here, I get pissed off with a lot of things but backspace-in-a-browser isn't one of them, I like it and always have. Maybe I take for granted my intimate knowledge of how html and browsers work. I get much more annoyed with some of the seemingly nonsensical Mac conventions coming from Windows.


> Can anyone explain why anyobe would make such a comment?

Because the original story doesn't add up. If you're typing and press backspace to delete some characters you just typed, without some additional tab pressing, mouse clicking, or Javascript shenanigans on behalf of the website, the browser won't go back in history. That's just a cold hard fact.


If people are getting mad at going back a page by accident, then they are going back a page by accident. It's happened to me, and while I'm still not entirely sure why, I really don't care why. The "Self Destruct" button shouldn't be next to the "Make Phone Call" button.


This behavior has hit me many times because on a laptop accidentally touching the trackpad can lose focus from a text field very easily, so while I am typing a comment/whatever if my thumb or palm drops a bit to touch the trackpad just before I hit the delete key, the browser is suddenly making me angry. Even if no text is lost, focus on doing whatever I was doing is lost.


Because you're not in VIM and text input actions shouldn't be used as shortcuts. Or be consistent and use every letters of your keyboard as shortcuts without Ctrl (or CMD) combination..


Backspace in some browsers goes to the previous page because that used to be the standard.

Nowadays we enter a lot of data in a web page and having to explain to an end user that the browser works differently depending on where the cursor is might be confusing for them.

A decade ago most people just used the internet for consuming the page (browsing), sometimes entering a few lines of data. Having the back button go back in your navigation makes sense in that respect as you are "browsing", not creating.

Re: "it's totally destructive", actually it is not destructive, you can hit backspace in the middle of your edits, go to the previous page, then go to the forward arrow in your browser and voila.. the text you entered is still there!

Of course that isn't true on every website as quite often the site developer is trying to do "smart" things. It is however a standard html feature and I just did that here while typing my text and it works fine on hacker news.

Personally I like the back button in my browser to go back in my browsing history, as mentioned by others, this is configurable in firefox.


I think the biggest problem here is a context one. When you use a shortcut inside a software, you don't (usually) think about the field focused. As I, like most of us here, use an IDE or a code editor every day, I think best context-free shortcuts involve more than one special key.

Even the alt + arrow shortcut is a bad idea because it mean "go to the beginning of the word" in Mac OS. I had very bad issue with the CMD + Arrow in my Chrome, because when I type I don't use the mouse.

Ctrl + CMD + Arrow is the perfect shortcut for me (and I think, for every XCode users).


Consider how most users interact with a page. I personally click to highlight text, use my mouse wheel to set the page just so, and I type. A lot. And I'm a fast typer. And I hit backspace. A lot. Why should I lose all my work because I'm not a cursor focus savant, or someone who never types? Because if you're a typer, this affects you. This happened to me at my job, causing me to lose hours of search and fill-in information, information that is necessary for me to keep my job. And it loses a lot of productivity for a lot of other people as well. Learn to use [Alt]+[←]. I do it one-handed all day long. And if your needs are so specialized that you require a single-button solution, you should be able to get that by changing a setting from the default, and not forcing everyone else to live with the ejector seat button doubling as the turn-signal.


PSA for anyone who is tempted to copy and paste the jQuery example posted by 'pathfinder': Make sure you account for "radio" and "checkbox" input types. They don't handle the backspace key the same way an <input type="text"> or <textarea> would.


"Back in 9/26/95, the Backspace key was mapped for go up one directory in Windows Explorer. This could be the reason why Microsoft also used the Backspace key on their IE for back/up a page. Of course, this is pure speculation on my part :)"

So this is leftover damage from Microsoft's bizarre campaign to fuse Internet Explorer with Windows Explorer? Why do I suddenly want to hurt someone?


Consistency across applications isn't a bad thing per se. Ask all those who argue that emacs or vi keybindings should be available everywhere ;-)


Safari removed that "feature" a while ago.


I wanted to add that I use the backspace quite a lot, and have found the opposite situation which might shed light on why Google likes it. When I hit a google search in my history, hoogle quickly puts the text focus in their main box so my backspace now starts erasing what I wrote rather than going further in the history, and I consider doing another search


Opera remembers text inputs (and caches pages) so going back and forth is instanteous and doesn't lose your inputs


Ironically I've become so custom to using backspace for navigating back that I constantly end up swearing when I use it on sites that hijack text-input like Google for instance, where pressing backspace will focus on the search-field, delete the last character and immediately perform a new search.


I suppose if you want to answer a question you have to understand the context, and as with reproducing bugs, you have to know the steps to recreate the problem.

It's not like they're being purposefully obnoxious - no more than when people answer with, 'why would you want do that?'


Does backspace go back a page? It doesn't on my setup (Firefox 28.0 on Ubuntu 12.04).


Firefox on Linux doesn't by default. You can change it in about:config by setting browser.backspace_action to 0. http://kb.mozillazine.org/Browser.backspace_action


My laptops have different keyboard layouts which leads me to often press backspace in error when attempting to press page up/down keys.

I don't really care if it's the default or not, I would just want the option to turn it off in Chrome.


I've only just noticed that Safari doesn't do this. I'm almost certain I used to extensively use backspace for navigation; since starting to use a trackpad almost exclusively, I've replaced that with swiping.


I prefer the swiping too. It's also unlikely that I would swipe two fingers over the trackpad on accident where as the backspace not being in a text-area's focus happens too often to be considered useful.


It doesn't in Linux' Firefox by default and that's bloody annoying.


Isn't the number of occurrences of this behaviour directly proportional to the amount of already-filled-in form fields?

- "Murphy's Law"


It doesn't?


Chrome[1] and Firefox[?] and probably others on Linux do not have this behavior enabled by default.

[1] https://code.google.com/p/chromium/issues/detail?id=144832


Of course it had to be Microsoft's fault... they used to have no clue about UX design.


other shortcuts:

go back: alt+left arrow go forward: alt+right arrow





Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: