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

Issue 706324 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Anchor <a> tags with {visibility:hidden} but with block content inside are still clickable

Reported by deprez.s...@gmail.com, Mar 29 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.110 Safari/537.36

Example URL:
http://jsfiddle.net/q19n8mer/

Steps to reproduce the problem:
1. Add some block content inside <a> tag which has visibility hidden
2. You can still click the link. 

What is the expected behavior?
You should not be able to click the link, which is invisible. Note that with non block contents inside like a <span>, it works fine. Also note that per HTML5, it's perfectly valid to have block inside anchor tags, see

- https://www.w3.org/TR/html5/text-level-semantics.html#the-a-element
- http://stackoverflow.com/questions/1827965/is-putting-a-div-inside-an-anchor-ever-correct

What went wrong?
The invisible anchor tags are still clickable (the href will be followed, if any, and the click event listeners will be triggered). 

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 58.0.3007.0  Channel: stable
OS Version: 16.04
Flash Version: 

It works fine on Firefox.
 
Labels: Needs-Triage-M58 Needs-Bisect

Comment 2 by e...@chromium.org, Mar 29 2017

Cc: cbiesin...@chromium.org glebl@chromium.org
Components: -Blink Blink>Layout
Labels: -Pri-2 Pri-3
Status: Available (was: Unconfirmed)

Comment 3 by e...@chromium.org, Mar 29 2017

Components: Blink>Input
I'm guessing this is Layout but might be input related. 
Cc: kavvaru@chromium.org
Labels: Needs-Feedback
Tested the issue on windows 7, Linux Ubuntu 14.04 and 16.04 using chrome version 58.0.3029.33 with the below steps

1. Open URL http://jsfiddle.net/q19n8mer/
2.Clicked on Another a link
3.Pop up opened without any issues.

Please find the attached screen shot and confirm if anything missed here.

Thanks,
706324.png
156 KB View Download
Yes, the second red link triggers the pop-up as wanted, the problem is that if you click above it, on the space taken by the first invisible <a> it also triggers the pop-up but it should not (elements with visibility:hidden should not trigger any event listeners).
Labels: -Type-Bug -Pri-3 -Needs-Feedback -Needs-Bisect -Needs-Triage-M58 has-bisect-per-revision M-59 OS-Mac OS-Windows Pri-1 Type-Bug-Regression
Thanks for the update.
Able to reproduce the issue on windows 7, Ubuntu 14.04 and Mac 10.12.3 using chrome version 57.0.2987.110 and canary 59.0.3056.0.Observed that event triggered if we click on above the Another a link.

This is regression issue broken in M48.Please find the bisect information as below

Narrow bisect::
Good :: 48.0.2562.0 --  (build revision 359213)
Bad:: 48.0.2563.0  --   (build revision 359458)

Change Log::
https://chromium.googlesource.com/chromium/src/+log/584ff7c7909d48591b4f418e968e61c4a5b08e62..f8b707eeb37bb58f34b53e64b591195cec269ae3

Blink CL::
https://chromium.googlesource.com/skia.git/+log/d7b25c734e68..64593525debc

Unable to find the suspect from both CL and blink CLs.
could any one from blink team please look into this issue.

Thanks,

Comment 7 by e...@chromium.org, Mar 31 2017

Components: -Blink>Layout
Status: Untriaged (was: Available)

Comment 8 by glebl@chromium.org, Mar 31 2017

Components: -Blink>Input Blink>Layout
Owner: glebl@chromium.org
I believe it's caused by the change in LayoutInline.cpp (http://crrev.com/359399)

Comment 9 by e...@chromium.org, Mar 31 2017

Owner: robho...@gmail.com
Status: Assigned (was: Untriaged)
Project Member

Comment 10 by bugdroid1@chromium.org, Apr 19 2017

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

commit 4cd4d67ff4b29899a150e92a129179ca4bbcdd49
Author: robhogan <robhogan@gmail.com>
Date: Wed Apr 19 20:20:53 2017

Restore behaviour of middle anonymous blocks inheriting style from inline parents

BUG= 706324 

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

[modify] https://crrev.com/4cd4d67ff4b29899a150e92a129179ca4bbcdd49/third_party/WebKit/LayoutTests/fast/css-generated-content/before-content-continuation-chain-expected.txt
[add] https://crrev.com/4cd4d67ff4b29899a150e92a129179ca4bbcdd49/third_party/WebKit/LayoutTests/fast/inline/middle-continuation-inherits-visibility-from-inline-parent.html
[modify] https://crrev.com/4cd4d67ff4b29899a150e92a129179ca4bbcdd49/third_party/WebKit/LayoutTests/platform/linux/fast/css/child-style-can-override-visited-style-expected.txt
[add] https://crrev.com/4cd4d67ff4b29899a150e92a129179ca4bbcdd49/third_party/WebKit/LayoutTests/platform/linux/virtual/sharedarraybuffer/fast/css/child-style-can-override-visited-style-expected.txt
[modify] https://crrev.com/4cd4d67ff4b29899a150e92a129179ca4bbcdd49/third_party/WebKit/LayoutTests/platform/mac/fast/css/child-style-can-override-visited-style-expected.txt
[add] https://crrev.com/4cd4d67ff4b29899a150e92a129179ca4bbcdd49/third_party/WebKit/LayoutTests/platform/mac/virtual/sharedarraybuffer/fast/css/child-style-can-override-visited-style-expected.txt
[modify] https://crrev.com/4cd4d67ff4b29899a150e92a129179ca4bbcdd49/third_party/WebKit/LayoutTests/platform/win/fast/css/child-style-can-override-visited-style-expected.txt
[add] https://crrev.com/4cd4d67ff4b29899a150e92a129179ca4bbcdd49/third_party/WebKit/LayoutTests/platform/win/virtual/sharedarraybuffer/fast/css/child-style-can-override-visited-style-expected.txt
[modify] https://crrev.com/4cd4d67ff4b29899a150e92a129179ca4bbcdd49/third_party/WebKit/Source/core/layout/LayoutInline.cpp

Comment 11 by e...@chromium.org, May 2 2017

Status: Fixed (was: Assigned)

Sign in to add a comment