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

Issue 607361 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Holding enter while clicking a link causes a stream of aborted provisional loads

Project Member Reported by csharrison@chromium.org, Apr 27 2016

Issue description

What steps will reproduce the problem?
(1) Navigate to any site that contains a standard <a> tag. 
(2) Hold enter, and click one of them.

What is the expected output?
The link navigates normally.

What do you see instead?
The page does not navigate, and instead flickers, as untold navigations are spawned and aborted. This kills useful metrics like the counts of net::ERR_ABORTED.
 
Components: Blink>Loader
I believe the code goes through the following path (note the enter key condition):
https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp&rcl=1461770197&l=159

Comment 3 by kinuko@chromium.org, Apr 28 2016

Owner: pdr@chromium.org
Looks like the last change for the link click behavior + enter key was reviewed by pdr@-- Phillip, do you think you could triage this?
Cc: pdr@chromium.org
Labels: Hotlist-Input-Dev
Owner: chongz@chromium.org
Status: Assigned (was: Untriaged)
Chong are you able to look at this?

I presume isEnterKeyDown() really should check if keyboard event repeat is false and not do the action on auto repeat.

pdr@ do you agree?
Any update on this? I could probably write up the patch if you all agree the method in #4 is sufficient.
chongz wrote a patch here: 
https://codereview.chromium.org/1988473003/

Comment 7 by chongz@chromium.org, May 17 2016

Components: IO>Keyboard
Status: Started (was: Assigned)
Sorry for the delay. I've wrote a patch (https://crrev.com/1988473003) with the method in #4 and it seems working for me. Currently waiting for pdr@'s review (since this code path has been reverted once).
Awesome! Maybe if we're lucky we can see this move the metrics dashboard :)
Project Member

Comment 9 by bugdroid1@chromium.org, May 18 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/00b2cde9efd718d1a35f9876a2333c41021abf9d

commit 00b2cde9efd718d1a35f9876a2333c41021abf9d
Author: chongz <chongz@chromium.org>
Date: Wed May 18 20:43:23 2016

Only simulate click for non-repeat Enter keydown on <a>

Before CL Blink will simulate click on <a> for every Enter keydown
event, after CL it will only do it for non-repeat keydown.

Firefox and Edge has the similar issue (won't navigate when holding Enter and click), Safari doesn't have the issue.

TEST=1. Find an <a>, hold Enter, left click <a>. The link should navigate.
     2. Focus <a> using Tab key, press Enter, Ctrl+Enter, Shift+Enter.
     The link should navigate.

BUG= 607361 

Review-Url: https://codereview.chromium.org/1988473003
Cr-Commit-Position: refs/heads/master@{#394540}

[modify] https://crrev.com/00b2cde9efd718d1a35f9876a2333c41021abf9d/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp

Labels: M-52 OS-All
Status: Fixed (was: Started)

Sign in to add a comment