Prevent switching from unedited section directly into VE

Bug: T117713
Change-Id: Iee9ae2bbe4757cb07e9aa2bd5f41a46c0ebb391a
This commit is contained in:
Alex Monk 2015-11-20 00:10:38 +00:00
parent c895ba38b1
commit 67a51aee9b

View file

@ -535,7 +535,10 @@
if (
mw.config.get( 'wgAction' ) === 'submit' ||
( mw.config.get( 'wgAction' ) === 'edit' && wikitextModified )
( mw.config.get( 'wgAction' ) === 'edit' && wikitextModified ) ||
// switching from section editing must prompt because we can't
// keep changes from that (yet?)
$( 'input[name=wpSection]' ).val()
) {
mw.loader.using( 'ext.visualEditor.switching' )
.done( function () {