Anchor <a> tags with {visibility:hidden} but with block content inside are still clickable
Reported by
deprez.s...@gmail.com,
Mar 29 2017
|
|||||||||
Issue descriptionUserAgent: 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.
,
Mar 29 2017
,
Mar 29 2017
I'm guessing this is Layout but might be input related.
,
Mar 30 2017
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,
,
Mar 30 2017
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).
,
Mar 31 2017
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,
,
Mar 31 2017
,
Mar 31 2017
I believe it's caused by the change in LayoutInline.cpp (http://crrev.com/359399)
,
Mar 31 2017
,
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
,
May 2 2017
|
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by nyerramilli@chromium.org
, Mar 29 2017