Bug 52986

Summary: Selecting text inside contenteditable tags is problematic
Product: WebKit Reporter: Patrick Quinn-Graham <patrick>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ap, kalman, leviw, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.6   
Bug Depends on: 55552    
Bug Blocks:    
Attachments:
Description Flags
Testcase none

Description Patrick Quinn-Graham 2011-01-23 15:52:07 PST
Created attachment 79881 [details]
Testcase

When users select text using a rapid mouse movement that extends outside of the contenteditable tag the selection behaviour is not always what a user expects: ie. the click mid way through text, drag (to select) all the way beyond the left (start) of the contenteditable, selection stops several characters before the start of the contenteditable contents. 

Attached test case includes three content editable areas: h1 that contains a <div>, an h1 that contains only text and a p tag.
Comment 1 Alexey Proskuryakov 2011-01-23 19:14:53 PST
Interesting that this doesn't happen with non-editable text - or even if position:absolute is added to contenteditable in the attached example. This also doesn't happen in Bugzilla textarea (where you're writing your comment).
Comment 2 Alexey Proskuryakov 2011-03-11 12:13:07 PST
See also: bug 56213.
Comment 3 Ryosuke Niwa 2011-04-03 00:41:53 PDT
(In reply to comment #1)
> Interesting that this doesn't happen with non-editable text - or even if position:absolute is added to contenteditable in the attached example. This also doesn't happen in Bugzilla textarea (where you're writing your comment).

This bug is to do with the way we avoid selection extending across editing boundary.
Comment 4 Ryosuke Niwa 2011-04-04 23:02:24 PDT
This is a duplicate of the bug 55552. I'm closing this one since the bug 55552 has patches posted.

*** This bug has been marked as a duplicate of bug 55552 ***
Comment 5 Ryosuke Niwa 2011-04-11 10:23:50 PDT
Okay, let's make this bug depend on the bug 55552 and add a layout test separately. I've already uploaded a DRT test on the bug 55552 so I'll upload a patch as soon as the bug 55552 is fixed.
Comment 6 Ryosuke Niwa 2012-04-30 22:37:48 PDT

*** This bug has been marked as a duplicate of bug 56213 ***