Bug 136911 - Non-editable blocks at the beginning/end of contenteditable block break the selection
Summary: Non-editable blocks at the beginning/end of contenteditable block break the s...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-18 01:12 PDT by Piotrek Koszuliński (Reinmar)
Modified: 2016-11-21 03:15 PST (History)
1 user (show)

See Also:


Attachments
Sample to reproduce the issue (2.55 KB, text/html)
2014-09-18 01:13 PDT, Piotrek Koszuliński (Reinmar)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piotrek Koszuliński (Reinmar) 2014-09-18 01:12:33 PDT
Steps to reproduce the problem:
1. Open the attached sample. It contains editable divs with non-editable block islands at the beginning and the end of them.
2. Try steps explained in the sample - CTRL+A, select all from context menu, CTRL+end/home, setting selection programatically.

What is the expected behavior?
Selection should include all the contents of editable element from the first non-editable block to the last one.

What went wrong?
Selection is either totally lost (first case) or a collapsed selection is set (second case).


I am aware that this is a tricky case but it works fine in all other browsers (except of course Blink). I tested the attached sample on Firefox and IE11 and both - visual part and selection API part - were working all right.

This issue was reported multiple times on CKEditor's bug tracker - http://dev.ckeditor.com/ticket/11064. It is getting more and more important for adoption of CKEditor widgets (wrappers for non-editable content inside editor) which proved to be very useful and many users start using them.
Comment 1 Piotrek Koszuliński (Reinmar) 2014-09-18 01:13:44 PDT
Created attachment 238294 [details]
Sample to reproduce the issue
Comment 2 Piotrek Koszuliński (Reinmar) 2014-09-18 01:14:33 PDT
Related bug on Blink's bug tracker - https://code.google.com/p/chromium/issues/detail?id=415474
Comment 3 Krzysztof 2016-11-21 03:15:40 PST
Is there any progress on this issue? It is still reproducible (same as Blink issue https://code.google.com/p/chromium/issues/detail?id=415474).