Merge "Try to make MW->VE switching failures break less things"

This commit is contained in:
jenkins-bot 2016-02-12 17:29:29 +00:00 committed by Gerrit Code Review
commit bcae181cec
2 changed files with 12 additions and 5 deletions

View file

@ -35,6 +35,7 @@
function showLoading() {
var $content, contentRect, offsetTop, windowHeight, top, bottom, middle;
$( 'html' ).addClass( 've-activated ve-loading' );
if ( !init.$loading ) {
init.$loading = $(
'<div class="ve-init-mw-desktopArticleTarget-loading-overlay">' +
@ -79,6 +80,7 @@
}
function hideLoading() {
$( 'html' ).removeClass( 've-activated ve-loading' );
if ( init.$loading ) {
init.$loading.detach();
}
@ -204,13 +206,18 @@
modified
);
} )
.done( function () {
incrementLoadingProgress();
} );
.then(
function () {
incrementLoadingProgress();
},
function () {
hideLoading();
resetLoadingProgress();
}
);
setEditorPreference( 'visualeditor' );
$( 'html' ).addClass( 've-activated ve-loading' );
showLoading();
incrementLoadingProgress();
active = true;

View file

@ -1067,7 +1067,7 @@ ve.init.mw.DesktopArticleTarget.prototype.restorePage = function () {
if ( 'vesection' in uri.query ) {
delete uri.query.vesection;
}
if ( 'action' in uri.query ) {
if ( 'action' in uri.query && $( '#wpTextbox1' ).length === 0 ) {
delete uri.query.action;
mw.config.set( 'wgAction', 'view' );
}