diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js index 41dd4b7e73..f380ed6b5c 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js @@ -609,9 +609,11 @@ if ( mode === 'visual' && target.getDefaultMode() === 'source' ) { target.switchToVisualEditor(); } else if ( - mode === 'source' && target.getDefaultMode() === 'source' + mode === 'source' ) { - // Requetsed section may have changed + // Requested section may have changed, or we may need + // to switch from visual mode to source mode with a + // section. target.switchToWikitextSection( section ); } } );