Bug 124765

Summary: Select all is broken when non-editable block is first/last child of contenteditable
Product: WebKit Reporter: Aleksander Nowodziński <aleksander>
Component: HTML EditingAssignee: Manish Gurnaney <manishgurnaney>
Status: NEW    
Severity: Normal CC: ahmad.saleem792, enrica, manishgurnaney, pkoszulinski, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://dev.ckeditor.com/ticket/11180
Attachments:
Description Flags
Sample to reproduce the issue. none

Aleksander Nowodziński
Reported 2013-11-22 02:39:40 PST
Steps to reproduce the problem: 1. Focus contenteditable with non-editable **block** as a first/last child. 2. Put caret in some editable paragraph next to non-editable block. 3. Press CTRL+A (or document.execCommand( 'SelectAll' )) 4. Nothing is selected: collapsed selection opposite to the non-editable block. (!) See attached sample for rich examples. Instead of containing all the contents of contenteditable, the selection gets collapsed opposite to non-editable block e.g. when non-editable block is first child, the selection goes to the end of contenteditable (and vice-versa). The entire content of contenteditable should be selected once CTRL+A is pressed. It works when **inline** non-editable element is first/last child. I'm able to reproduce it in latest Safari, Chrome, Chromium and Opera. This bug is critical for CKEditor (http://dev.ckeditor.com/ticket/11180) and other WYSIWYG HTML editors.
Attachments
Sample to reproduce the issue. (2.27 KB, text/html)
2013-11-22 02:40 PST, Aleksander Nowodziński
no flags
Aleksander Nowodziński
Comment 1 2013-11-22 02:40:28 PST
Created attachment 217662 [details] Sample to reproduce the issue.
Ahmad Saleem
Comment 2 2022-06-02 12:08:18 PDT
I am still able to reproduce this bug in Safari 15.5 on macOS 12.4. All other browsers Chrome Canary 104 and Firefox Nightly 103 works same to each other. Only Safari has "Selection" problem as specified in the attached test case. Thanks!
Note You need to log in before you can comment on or make changes to this bug.