현상
In Firefox, when deleting the last character before a non-editable element in a contenteditable div, the caret correctly stays adjacent to the remaining content instead of jumping to the end.
재현 예시
- Focus on contenteditable element.
- Text contains non-editable element (e.g., “Hello @user again”).
- Delete character just before the non-editable element (Backspace or Delete key).
관찰된 동작
- Correct behavior: Caret stays adjacent to the non-editable element
- No jumping: Caret doesn’t jump to end of editor
- User can continue typing: Can immediately type next character
- Works correctly: Firefox handles deletion properly
참고사항
This is a control case demonstrating that the issue is Chrome-specific and Firefox works correctly.