Steps to reproduce:
- In VisualEditor standalone, edit <h1>AB</h1><p>C</p>
- Select from B to C (inclusive), then press CTRL+C
- Move the cursor to inside the end of the heading (just after the B), then press CTRL+V
Expected behaviour:
A balanced transaction is appended to the history AND the document data stays balanced.
Observed behaviour:
An unbalanced transaction is appended, which would insert the following content:
[
{ type: 'paragraph' },
'B',
{ type: '/heading' }, // UNBALANCED
{ type: 'paragraph' },
'C',
{ type: '/paragraph' }
]However, the document data stays balanced.