Select all is broken when non-editable block is first/last child of contenteditable

  1. Focus contenteditable. Put caret in editable paragraph (i.e. at "^").
  2. Press CTRL+A
  3. Nothing is selected: collapsed selection opposite to the non-editable block.
Alternatively:
  1. Focus contenteditable. Put caret in editable paragraph (i.e. at "^").
  2. Press the button in the bottom to execCommand( 'SelectAll' )
  3. Nothing is selected: collapsed selection opposite to the non-editable block.

Broken: Non-editable block as a first-child of contenteditable

Non-editable div.

Editable pa^ragraph.

Broken: Non-editable block as a last-child of contenteditable

Edit^able paragraph.

Non-editable div.

Works: Non-editable inline as a first-child of contenteditable

Non-editable span.

Editable paragr^aph.

Works: Non-editable inline as a last-child of contenteditable

Editab^le paragraph.

Non-editable span.