Fix contentEditable selection for elements with no children