Phenomenon
When pressing Enter inside a blockquote element in Safari, nested blockquote structures may be created unexpectedly. This breaks the intended quote structure and creates invalid or confusing HTML.
Reproduction example
- Create a blockquote:
<blockquote><p>Quoted text</p></blockquote> - Place cursor inside the blockquote text
- Press Enter
Observed behavior
- A nested blockquote may be created:
<blockquote><p>Text</p><blockquote><p></p></blockquote></blockquote> - Or the blockquote structure may break
- DOM structure becomes malformed
- Visual appearance may be unexpected
Expected behavior
- A new paragraph should be created within the same blockquote
- No nested blockquotes should be created
- Blockquote structure should be maintained
- Behavior should be consistent with Chrome/Edge
Browser Comparison
- Chrome/Edge: Creates paragraph within blockquote (correct)
- Firefox: May break blockquote structure
- Safari: May create nested blockquotes (this case)
Notes and possible direction for workarounds
- Intercept Enter key in blockquote context
- Prevent default behavior
- Manually create paragraph within blockquote
- Normalize blockquote structure after operations