message: fallback to setting caret on line node for empty lines
  instead of setting at the end of the editor
diff: @@ -44,16 +44,13 @@ export function setCaretPosition(editor, model, caretPosition) {
  let focusNode;
  const lineNode = editor.childNodes[lineIndex];
  if (lineNode) {
  - if (lineNode.childNodes.length === 0 && offset === 0) {
  - focusNode = lineNode;
  - } else {
  focusNode = lineNode.childNodes[nodeIndex];
  -
  - if (focusNode && focusNode.nodeType === Node.ELEMENT_NODE) {
  + if (!focusNode) {
  + focusNode = lineNode;
  + } else if (focusNode.nodeType === Node.ELEMENT_NODE) {
  focusNode = focusNode.childNodes[0];
  }
  }
  - }
  // node not found, set caret at end
  if (!focusNode) {
  range.selectNodeContents(editor);
  