if (
                startNode.nodeType === 3 &&
                    startRange.startOffset === startNode.textContent.length
            ) {
                // Check if start offset is beyond the end of the text node.