diff --git a/source/range/Boundaries.ts b/source/range/Boundaries.ts index 2908bc2f..0e928bd1 100644 --- a/source/range/Boundaries.ts +++ b/source/range/Boundaries.ts @@ -157,6 +157,11 @@ const moveRangeBoundariesUpTree = ( } range.setStart(startContainer, startOffset); + + if(!(startContainer as HTMLElement).isContentEditable){ + range.setStart(endContainer, endOffset); + } + range.setEnd(endContainer, endOffset); };