Bug 18272 - Selection marks more than its span boundary because of outer <div> width and inner <div> positioning
Summary: Selection marks more than its span boundary because of outer <div> width and ...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 420+
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://english.usvishakh.net/blog/
Keywords: HasReduction, InRadar
Depends on:
Blocks:
 
Reported: 2008-04-01 18:34 PDT by jasneet
Modified: 2008-07-24 13:12 PDT (History)
6 users (show)

See Also:


Attachments
screenshot (148.03 KB, image/jpeg)
2008-04-01 18:34 PDT, jasneet
no flags Details
reduction (1.92 KB, text/html)
2008-04-01 18:34 PDT, jasneet
no flags Details
screenshot (160.15 KB, image/png)
2008-06-24 21:45 PDT, David K. Dean
no flags Details
screenshot (374.55 KB, image/jpeg)
2008-06-25 08:59 PDT, David K. Dean
no flags Details
screenshot (374.55 KB, image/jpeg)
2008-06-26 13:39 PDT, David K. Dean
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description jasneet 2008-04-01 18:34:01 PDT
I Steps:
Go to 
http://english.usvishakh.net/blog/

II Issue:
Select the text of the blog article. Selection marks more than user intends to do.

III Conclusion:
The outer <div> (which has a class=post-container) that contains the text has a width of 100%. Since the navigation on left  (i.e. Fun, Jokes, etc) is positioned inside of that <div>, the left navigation text also gets selected when the contents of the post-container <div> is selected.  See the 1st case in the attached reduction.

In the 2nd testcase(attached reduction), I reduced the width of post-container <div> to 85% so the <div> that contains the left navigation is not enclosed in it. This works in Safari

IV Other browsers:
IE7: ok
FF3: ok
Opera9.24: ok

V Nightly tested: 31446
Comment 1 jasneet 2008-04-01 18:34:18 PDT
Created attachment 20285 [details]
screenshot
Comment 2 jasneet 2008-04-01 18:34:44 PDT
Created attachment 20286 [details]
reduction
Comment 3 David Kilzer (:ddkilzer) 2008-06-16 12:54:16 PDT
Confirmed.  Also happens when selecting text in <http://webkit.org/blog/>.

Comment 4 David Kilzer (:ddkilzer) 2008-06-16 12:57:38 PDT
<rdar://problem/6012355>
Comment 5 David Kilzer (:ddkilzer) 2008-06-16 12:59:29 PDT
Note that selection works as expected in Firefox 2.0.0.x.
Comment 6 David Kilzer (:ddkilzer) 2008-06-16 13:03:05 PDT
I changed the version field back to 420+ since this bug reproduces on Safari 2.0.4 on Mac OS X 10.4.11 with its original WebKit.  Thus it is not a regression.

Comment 7 David K. Dean 2008-06-24 13:28:17 PDT
This also happens on http://daringfireball.net and and http://macrumors.com.
Comment 8 David K. Dean 2008-06-24 21:45:32 PDT
Created attachment 21922 [details]
screenshot

Screenshot from daringfireball.net showing text selection problem.
Comment 9 David K. Dean 2008-06-25 08:59:53 PDT
Created attachment 21931 [details]
screenshot

1 more screenshot showing slightly different behavior on www.macrumors.com. This is from Safari for Windows 3.1.2.
Comment 10 David K. Dean 2008-06-25 09:03:00 PDT
This problem happens in both Safari 3.1.1 for Mac OS X and Safari 3.1.x for Windows XP. Firefox 3 (for both Mac OS X or Windows XP) nor Camino 1.6.1 have this issue. They both properly select only the text and the selection stays within the <div> you are trying to select.
Comment 11 David K. Dean 2008-06-26 13:39:05 PDT
Created attachment 21960 [details]
screenshot