Bug 113584 - Using position: absolute to hide span in link highlights all text below when right clicking the link
Summary: Using position: absolute to hide span in link highlights all text below when ...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari Technology Preview
Hardware: Mac macOS 13
: P2 Minor
Assignee: Nobody
URL: http://jsfiddle.net/ellenh/hVG5d/
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-29 08:14 PDT by Ellen Herzfeld
Modified: 2023-09-19 14:25 PDT (History)
6 users (show)

See Also:


Attachments
A page showing the problem (same as jsfiddle) (2.84 KB, text/html)
2013-03-29 08:14 PDT, Ellen Herzfeld
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ellen Herzfeld 2013-03-29 08:14:01 PDT
Created attachment 195747 [details]
A page showing the problem (same as jsfiddle)

W3C recommends adding a hidden span containing informative text to links like "read more". They use position: absolute to hide the span, as does html5 boilerplate using a method suggested by Jonathan Snook.

However, in webkit on Mac (Safari, Chrome, and Webkit nightly) when you right click on such a link, instead of only highlighting the link itself, everything below the link is also highlighted. Very ugly...

I've made a fiddle to show this, and have attached the same in a html file.

I think I found a workaround using display: inline-block instead of position:absolute, but still.
Comment 1 Samuel White 2014-02-07 11:21:54 PST
Moving out of accessibility.
Comment 2 Ahmad Saleem 2023-09-19 14:25:46 PDT
I am able to reproduce this bug in 'Safari Technology Preview 178', while right-clicking on "Read more", everything below get selected as well.

Changing it to 'New' from 'Unconfirmed' and also changing from 'New Bugs' to 'Layout & Rendering' due to 'Selection' being rendering stuff.