Steps to reproduce:
- Go to https://en.wikipedia.org/wiki/Foobar?action=edit§ion=2 with your editor set to WikiText source editor
- Make an edit
- Try to switch to VisualEditor
Expected results: Editor is switched to VisualEditor with edit still intact.
Actual results: The user is given a dialog box asking if they want to switch and discard their changes.
Proposed solution: Take new section content, splice into base revision's wikitext using replaceSectionAtRev.