Bug 52986 - Selecting text inside contenteditable tags is problematic
Summary: Selecting text inside contenteditable tags is problematic
Status: RESOLVED DUPLICATE of bug 56213
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh Intel OS X 10.6
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 55552
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-23 15:52 PST by Patrick Quinn-Graham
Modified: 2012-04-30 22:37 PDT (History)
4 users (show)

See Also:


Attachments
Testcase (317 bytes, text/html)
2011-01-23 15:52 PST, Patrick Quinn-Graham
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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 ***