Phenomenon
When a contenteditable region is inside an iframe, its behavior may differ from when it’s in the main document. Selection, focus, and event handling may be inconsistent.
Reproduction example
- Create an iframe.
- Inside the iframe, create a contenteditable div.
- Try to interact with the contenteditable (type, select, etc.).
- Compare the behavior with a contenteditable in the main document.
Observed behavior
- In Edge on Windows, contenteditable behavior differs inside iframes.
- Selection may not work correctly.
- Focus handling may be inconsistent.
- Events may not bubble correctly.
Expected behavior
- contenteditable should behave identically whether in the main document or an iframe.
- Selection and focus should work consistently.
- Events should behave as expected.