Phenomenon
When a contenteditable element enters or exits fullscreen mode using the Fullscreen API, focus and selection may be lost. The caret position may reset, and editing may be disrupted.
Reproduction example
- Create a contenteditable div with some selected text.
- Enter fullscreen mode programmatically.
- Observe whether focus and selection are maintained.
- Exit fullscreen mode.
- Check if focus and selection are restored.
Observed behavior
- In Chrome on Windows, fullscreen transitions may cause focus loss.
- Selection may be cleared when entering fullscreen.
- Caret position may reset.
- Editing may be disrupted during transition.
Expected behavior
- Focus and selection should be maintained during fullscreen transitions.
- Caret position should be preserved.
- Editing should continue seamlessly.