Bug 21960 - Chrome/Safari selects the region outside the element
Summary: Chrome/Safari selects the region outside the element
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 525.x (Safari 3.1)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL: http://bash.org.ru/
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-29 15:58 PDT by Jon@Chromium
Modified: 2023-05-05 19:23 PDT (History)
5 users (show)

See Also:


Attachments
Reduction (334 bytes, text/html)
2008-10-29 15:59 PDT, Jon@Chromium
no flags Details
Reduction (quirks mode) (269 bytes, text/html)
2008-10-29 16:00 PDT, Jon@Chromium
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jon@Chromium 2008-10-29 15:58:45 PDT
Issue originated in Chromium bugs, see http://code.google.com/p/chromium/issues/detail?id=3527

IE and FF selects only the region inside the red box but Chrome/Safari does select the region outside.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<body>
<div style="margin: 20px auto; width: 740px;font-family: 'Lucida Grande', 'Tahoma', sans-serif; border: 2px solid red">Only area with in div region should get selected. But the region that lies outside the div also gets selected.</div>
</body>
</html>

See the attached reductions.
Comment 1 Jon@Chromium 2008-10-29 15:59:35 PDT
Created attachment 24759 [details]
Reduction
Comment 2 Jon@Chromium 2008-10-29 16:00:22 PDT
Created attachment 24760 [details]
Reduction (quirks mode)
Comment 3 Ahmad Saleem 2023-05-05 14:18:03 PDT
Isn't this intentional behavior of WebKit / Safari to have gapless selection, hence, we have empty space with 'selection' color painted as well, while Chrome now has 'gapped' selection, so only have selection around text?

Can someone please confirm whether we need to fix it or not? Or we can mark this duplicate of other 'gapped' selection bug?
Comment 4 zalan 2023-05-05 19:23:28 PDT
(In reply to Ahmad Saleem from comment #3)
> Isn't this intentional behavior of WebKit / Safari to have gapless
> selection, hence, we have empty space with 'selection' color painted as
> well, while Chrome now has 'gapped' selection, so only have selection around
> text?
Correct!