Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 160471 Javascript generated backspace key cause browser to execute "Back" command.
Starred by 10 users Reported by danrze...@gmail.com, Nov 12 2012 Back to list
Status: WontFix
Owner:
Closed: Aug 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocked on:
issue 520519



Sign in to add a comment
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11

Steps to reproduce the problem:
Programmatically generating a backspace keydown event in javascript and sending it to an text input field will cause the browser to go back to the previous page.

What is the expected behavior?
The event would not bubble up to the browser and execute the keypress. No other program generated key presses bubble up to the browser and execute the standard behavior. For example, generating a Control+F command will not cause the browser to go into "Find" mode.

What went wrong?
The event bubbled up to the browser.

Did this work before? N/A 

Chrome version: 23.0.1271.64  Channel: stable
OS Version: OS X 10.8.2

Here is a sample html file which will reproduce the issue.

<!DOCTYPE html>
<html>
<head>
  <title>Backspace Issue</title>
  <script type="text/javascript">
    function press(event) {
      var evt = document.createEvent("KeyboardEvent");
      evt.initKeyboardEvent("keydown", true, true, null, "U+0008", 0, "")
      document.querySelector("#textfield").dispatchEvent(evt)
    }
  </script>
</head>
<body>
  <input type="text" id="textfield"/>
  <button onclick="press(event)">Press Me</button>
</body>
</html>

Just press the button and the page will go "Back" (assuming there is a page in history to go back to).
 
Labels: -Pri-2 -OS-Mac Pri-1 OS-All
Status: Untriaged
This is reproducible in 21.0.1180.89, 22.0.1229.96 and 23.0.1271.64 on Windows 7.
Not a regression
Labels: Mstone-25
Also reproducible in 25.0.1324.0 (Official Build 167303) canary
Labels: -Mstone-25 Mstone-23 Area-WebKit WebKit-JavaScript
Project Member Comment 4 by bugdroid1@chromium.org, Mar 10 2013
Labels: -Mstone-23 -Area-WebKit -WebKit-JavaScript Cr-Content Cr-Content-JavaScript M-23
Project Member Comment 5 by bugdroid1@chromium.org, Apr 5 2013
Labels: -Cr-Content Cr-Blink
Project Member Comment 6 by bugdroid1@chromium.org, Apr 6 2013
Labels: -Cr-Content-JavaScript Cr-Blink-JavaScript
Repro on M31 windows.
Note: on Chrome OS (29) nothing happens at all (no backspacing, no history back).
[Automated message] This issue does not seem to be a V8 issue. The label Cr-Blink-JavaScript will be removed next week. The label Cr-Blink will be added instead. If you think that this issue is correctly labeled as a V8 issue please contact hablich@.
Labels: -Cr-Blink-JavaScript NotV8
[Automated message] This issue does not seem to be a V8 issue. The label Cr-Blink-JavaScript is removed. The label Cr-Blink is added instead. If you think that this issue was correctly labeled as a V8 issue please contact hablich@.
Comment 10 by tkent@chromium.org, Jul 17 2015
Labels: -Cr-Blink Cr-Blink-Input
Comment 11 by laforge@google.com, Aug 27 2015
Labels: -M-23
Pulling the m-23 label, since this is at least categorized.
Blockedon: chromium:520519
Labels: -Pri-1 Pri-2
Owner: dtapu...@chromium.org
Status: Assigned
Labels: -NotV8 Hotlist-Input-Dev
Seems like this specific bug may become moot per the removal of the backspace shortcut?
https://chromium.googlesource.com/chromium/src/+/a9fc5462ba084936191d51a9391ec5255e79a930
Yes that is correct.
Status: WontFix
Backspace doesn't go back now. :)
Sign in to add a comment