mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-28 08:00:32 +00:00
Correct path for obtaining loadingOverlay
An undefined thing is not a constructor clearly
Introduced in 5593b23aa8
Bug: T216853
Change-Id: Ief5ca9098fc76a4ae8436dc6a3b4352e3c845147
This commit is contained in:
parent
b45120731f
commit
78ca1922f8
|
@ -2,7 +2,7 @@
|
||||||
var
|
var
|
||||||
mobile = M.require( 'mobile.startup' ),
|
mobile = M.require( 'mobile.startup' ),
|
||||||
loader = mobile.rlModuleLoader,
|
loader = mobile.rlModuleLoader,
|
||||||
LoadingOverlay = mobile.LoadingOverlay,
|
loadingOverlay = mobile.loadingOverlay,
|
||||||
eventBus = new EventEmitter(),
|
eventBus = new EventEmitter(),
|
||||||
// eslint-disable-next-line jquery/no-global-selector
|
// eslint-disable-next-line jquery/no-global-selector
|
||||||
$talk = $( '.talk, [rel="discussion"]' ),
|
$talk = $( '.talk, [rel="discussion"]' ),
|
||||||
|
@ -84,13 +84,13 @@
|
||||||
if ( inTalkNamespace ) {
|
if ( inTalkNamespace ) {
|
||||||
// reload the page after the new discussion was added
|
// reload the page after the new discussion was added
|
||||||
eventBus.on( 'talk-added-wo-overlay', function () {
|
eventBus.on( 'talk-added-wo-overlay', function () {
|
||||||
var loadingOverlay = new LoadingOverlay();
|
var overlay = loadingOverlay();
|
||||||
|
|
||||||
window.location.hash = '';
|
window.location.hash = '';
|
||||||
// setTimeout to make sure, that loadingOverlay's overlayenabled class on html doesnt
|
// setTimeout to make sure, that loadingOverlay's overlayenabled class on html doesnt
|
||||||
// get removed by OverlayManager (who closes TalkSectionAddOverlay).
|
// get removed by OverlayManager (who closes TalkSectionAddOverlay).
|
||||||
window.setTimeout( function () {
|
window.setTimeout( function () {
|
||||||
loadingOverlay.show();
|
overlay.show();
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}, 10 );
|
}, 10 );
|
||||||
} );
|
} );
|
||||||
|
|
Loading…
Reference in a new issue