New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 639297 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Backspace / Delete are run multiple times if keydown dispatched in the middle of the event handler

Reported by mdu...@productivemobile.com, Aug 19 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36

Steps to reproduce the problem:
1. Follow the link: http://jsbin.com/bagumexeji/1/edit?js,console,output
2. Write down "123" in the first input and then press "Backspace" button.

Here is the minimal JavaScript code to reproduce the problem:

var h1 = document.createElement('h1');
h1.innerHTML = 'Event Dispatching Problem';
document.body.appendChild(h1);

var div = document.createElement('div');
div.innerHTML = 'Write down "123" in the first input and then press "Backspace" button.<br /><b>Expected behaviour:</b> last char deleted<br/><b>Actual behaviour:</b> the whole input is cleared.';
document.body.appendChild(div);

var mainInput = document.createElement('input');
document.body.appendChild(mainInput);
document.body.appendChild(document.createElement('br'));
var secondaryInput = document.createElement('input');
document.body.appendChild(secondaryInput);

mainInput.addEventListener('input', function(e) {
  secondaryInput.dispatchEvent(new KeyboardEvent('keydown', {key: " "}));
});

What is the expected behavior?
Last character of the first input value is deleted.

What went wrong?
The whole input is cleared.

Did this work before? N/A 

Chrome version: 52.0.2743.116  Channel: stable
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 22.0 r0
 
Cc: dtapu...@chromium.org
Components: -Blink Blink>Input
Labels: -Pri-2 Hotlist-Input-Dev Pri-3
Owner: chongz@chromium.org
Status: Assigned (was: Unconfirmed)
mdulin@ I can reproduce this on stable channel but not on canary.

chongz@ is this something that we fixed?

Comment 2 by chongz@chromium.org, Aug 19 2016

Labels: -OS-Mac OS-All
Status: WontFix (was: Assigned)
Cannot reproduce on Canary 54.0.2832.2, seems already been fixed.
(Able to reproduce on stable though)

Sign in to add a comment