Monday, June 18, 2018

keyboard shortcuts - Why does backspace go back a page? This behavior is so frustrating!


When using a browser, like Firefox, I appreciate that I can easily navigate my tab history with Alt+ (for back) and Alt+ (for forward.) That makes perfectly good sense to me, and I've used that keyboard shortcut for the longest time.


I frequently do text input in web pages. 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. I may have lost what I was writing. And I am a very unhappy user.


Chrome developers have decided to remove this, see this story from Ars Technica:



Google hovers over delete button for backspace nav shortcut in Chrome Google: Only 0.04 percent of page views navigate via the backspace button. ... We have UseCounters showing that 0.04 percent of page views navigate back via the backspace button and 0.005 percent of page views are after a form interaction.




This means that up to 1 in 8 backspace navigations could be losing user data.


I hypothesize that many of these are accidental - I lost text again a few days ago because of this feature.


Why did browser creators think this is such a great feature? Alt+ is unambiguous. But to overload the Backspace key with this behavior is atrocious! I can see from a quick Google search that many others are frustrated by this.



  • How did this come about?

  • Is the standard default behavior too strongly established to reverse course?

  • Can we change it, and what would be the plan to do so?


Canonical paths to blocking this



I'll be logging the canonical ways to turn this off for browsers here, and I do not want to see software add-ons here:




Answer



I don't know how it started but I can add my two cents about what ALL my clients say:



I would love to see this go away for good, and the first thing I do when building a form laden website is the following jQuery script:


var hasfocus = 'false';

// when focus happens, set a variable
$(document).on('focusin','input, textarea',function() {

hasfocus = 'true';
});

// unset when focus is not happening
$(document).on('focusout','input, textarea',function() {
hasfocus = 'false';
});

// if not in a form field, stop backspace and delete default action
$(document).keypress(function (e) {

if(e.which == 8 || e.which == 46) {
if(hasfocus == 'false') {
e.preventDefault();
}
}
});

No comments:

Post a Comment

technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...