mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-24 14:23:53 +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
|
||||
mobile = M.require( 'mobile.startup' ),
|
||||
loader = mobile.rlModuleLoader,
|
||||
LoadingOverlay = mobile.LoadingOverlay,
|
||||
loadingOverlay = mobile.loadingOverlay,
|
||||
eventBus = new EventEmitter(),
|
||||
// eslint-disable-next-line jquery/no-global-selector
|
||||
$talk = $( '.talk, [rel="discussion"]' ),
|
||||
|
@ -84,13 +84,13 @@
|
|||
if ( inTalkNamespace ) {
|
||||
// reload the page after the new discussion was added
|
||||
eventBus.on( 'talk-added-wo-overlay', function () {
|
||||
var loadingOverlay = new LoadingOverlay();
|
||||
var overlay = loadingOverlay();
|
||||
|
||||
window.location.hash = '';
|
||||
// setTimeout to make sure, that loadingOverlay's overlayenabled class on html doesnt
|
||||
// get removed by OverlayManager (who closes TalkSectionAddOverlay).
|
||||
window.setTimeout( function () {
|
||||
loadingOverlay.show();
|
||||
overlay.show();
|
||||
window.location.reload();
|
||||
}, 10 );
|
||||
} );
|
||||
|
|
Loading…
Reference in a new issue