Bug 136911

Summary: Non-editable blocks at the beginning/end of contenteditable block break the selection
Product: WebKit Reporter: Piotrek Koszuliński (Reinmar) <pkoszulinski>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: k.krzton
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Sample to reproduce the issue none

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).