Bug 69888 - a span with visibility:hidden in an anchor makes it unclickable
Summary: a span with visibility:hidden in an anchor makes it unclickable
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-11 17:37 PDT by Mike Lawther
Modified: 2022-08-06 18:39 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Lawther 2011-10-11 17:37:05 PDT
As reported in http://crbug.com/97970:

Test case:

    <a href="anything"><span style="visibility:hidden;">text here</span></a>

Expected: Text is invisible, but span still clickable
Actual: Text is invisible, span not clickable

In IE9 (Windows 7) and Firefox 7.0.1 (MacOS X 10.6) and Opera 11.51 (MacOS X 10.6), the text is invisible, but the underline renders and the link is still clickable.
Comment 1 Ahmad Saleem 2022-08-06 18:38:57 PDT
I am not able to reproduce this bug using test case from Comment 0 (turned into JSFiddle) in Safari 15.6 on macOS 12.5.

Link - https://jsfiddle.net/ymqf4aeu/show

It is working as expected and text is invisible but upon hovering over the span, it changes cursor to clickable link and upon click, it goes to 404 as expected. It is matching with all other browsers (Chrome Canary 106 and Firefox Nightly 105). I am going to mark this as "RESOLVED CONFIGURATION CHANGED". Thanks!