New issue
Advanced search Search tips
Starred by 10 users

Issue metadata

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
link

Issue 160471: Javascript generated backspace key cause browser to execute "Back" command.

Reported by danrze...@gmail.com, Nov 12 2012

Issue description

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).
 

Comment 1 by athigle@chromium.org, Nov 13 2012

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

Comment 2 by athigle@chromium.org, Nov 14 2012

Labels: Mstone-25
Also reproducible in 25.0.1324.0 (Official Build 167303) canary

Comment 3 by athigle@chromium.org, Nov 14 2012

Labels: -Mstone-25 Mstone-23 Area-WebKit WebKit-JavaScript

Comment 4 by bugdroid1@chromium.org, Mar 10 2013

Project Member
Labels: -Mstone-23 -Area-WebKit -WebKit-JavaScript Cr-Content Cr-Content-JavaScript M-23

Comment 5 by bugdroid1@chromium.org, Apr 5 2013

Project Member
Labels: -Cr-Content Cr-Blink

Comment 6 by bugdroid1@chromium.org, Apr 6 2013

Project Member
Labels: -Cr-Content-JavaScript Cr-Blink-JavaScript

Comment 7 by kenjibaheux@chromium.org, Sep 6 2013

Repro on M31 windows.
Note: on Chrome OS (29) nothing happens at all (no backspacing, no history back).

Comment 8 by hablich@chromium.org, Mar 13 2015

[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@.

Comment 9 by hablich@chromium.org, Mar 19 2015

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.

Comment 12 by dtapu...@chromium.org, Aug 27 2015

Blockedon: chromium:520519
Labels: -Pri-1 Pri-2
Owner: dtapu...@chromium.org
Status: Assigned

Comment 13 by dtapu...@chromium.org, Aug 27 2015

Labels: -NotV8 Hotlist-Input-Dev

Comment 14 by elawrence@chromium.org, May 17 2016

Seems like this specific bug may become moot per the removal of the backspace shortcut?
https://chromium.googlesource.com/chromium/src/+/a9fc5462ba084936191d51a9391ec5255e79a930

Comment 15 by dtapu...@chromium.org, May 17 2016

Yes that is correct.

Comment 16 by esprehn@chromium.org, Aug 3 2016

Status: WontFix (was: Assigned)
Backspace doesn't go back now. :)

Sign in to add a comment