mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Properly clear this.section when switching from VE
Bug: T153276 Change-Id: Idc251c73c03bf87b6e6ca716be98b38d4fb68c5e
This commit is contained in:
parent
c92418e4da
commit
17a164363b
|
@ -1631,12 +1631,15 @@ ve.init.mw.DesktopArticleTarget.prototype.switchToWikitextEditor = function ( di
|
|||
var uri, oldid, prefPromise, dataPromise,
|
||||
target = this;
|
||||
|
||||
// We may have this.section but VE is always full page at the moment
|
||||
this.section = null;
|
||||
|
||||
if ( ve.init.target.isModeAvailable( 'source' ) && !leaveVE ) {
|
||||
if ( discardChanges ) {
|
||||
dataPromise = mw.libs.ve.targetLoader.requestPageData(
|
||||
'source',
|
||||
this.pageName,
|
||||
null, // We may have this.section but VE is always full page at the moment
|
||||
this.section,
|
||||
this.requestedRevId,
|
||||
this.constructor.name
|
||||
).then(
|
||||
|
|
Loading…
Reference in a new issue