jenkins-bot has submitted this change and it was merged.
Change subject: Show Overlays only after the DOM is ready
......................................................................
Show Overlays only after the DOM is ready
Bug: T88295
Change-Id: I7f0622084427fd58d648dce8bdb478645bd047c4
---
M javascripts/OverlayManager.js
1 file changed, 10 insertions(+), 6 deletions(-)
Approvals:
Jdlrobson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/javascripts/OverlayManager.js b/javascripts/OverlayManager.js
index c04c19f..504976a 100644
--- a/javascripts/OverlayManager.js
+++ b/javascripts/OverlayManager.js
@@ -217,14 +217,18 @@
* which resolves to an overlay.
*/
add: function ( route, factory ) {
- var entry = {
- route: route,
- factory: factory
- };
+ var self = this,
+ entry = {
+ route: route,
+ factory: factory
+ };
this.entries[route] = entry;
- // check if overlay should be shown for the current path
- this._processMatch( this._matchRoute(
this.router.getPath(), entry ) );
+ // Check if overlay should be shown for the current
path.
+ // The DOM must fully load before we can show the
overlay because Overlay relies on it.
+ $( function () {
+ self._processMatch( self._matchRoute(
self.router.getPath(), entry ) );
+ } );
},
/**
--
To view, visit https://gerrit.wikimedia.org/r/198132
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7f0622084427fd58d648dce8bdb478645bd047c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Bmansurov <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits