Steps to reproduce:
- Open a page in the visual editor.
- Click "Cite".
- Click the switch-to-wikitext button.
- Save changes
- See <ref /> in the wikitext.
Steps to reproduce:
@Esanders: I looked at this, and was tempted to try a this.getSurface().getModel().popAllStaging call before this.serialize in DesktopArticleTarget#switchToWikitextEditor - but then I looked into how the save dialog is opened... Would this be the right change to make? (in the editSource function)
- this.getSurface().getDialogs().openWindow( 'wikitextswitchconfirm', { target: this } ); + var windowAction = ve.ui.actionFactory.create( 'window', this.getSurface() ); + windowAction.open( 'wikitextswitchconfirm', { target: this } );
Change 268857 had a related patch set uploaded (by Alex Monk):
DesktopArticleTarget#editSource: Use actionFactory to create a window with the surface
Change 268857 merged by jenkins-bot:
DesktopArticleTarget#editSource: Use actionFactory to create a window with the surface