mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-12 09:09:25 +00:00
Merge "Try to make MW->VE switching failures break less things"
This commit is contained in:
commit
bcae181cec
|
@ -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;
|
||||
|
|
|
@ -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' );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue