Go back before replacing current overlay
There are 2 ways to reach the talk topic create overlay 1) Navigating via link in page directly (currently only possible on talk pages via new topic button) 2) From the list of talk topics After saving in both cases you want to "GO BACK" and exit the overlay before replacing it - otherwise what happens is you end up replacing the create talk topic overlay with a list of talk topics with the old instance of the talk overlay underneath (which causes the OverlayManager a lot of confusion) You need to go back before replacing stuff. Bug: T229972 Change-Id: I7cc65dab8883744496380f4e1119cdc31f18f791
This commit is contained in:
parent
ebfd2760f9
commit
e09a6930b8
|
@ -65,14 +65,21 @@
|
|||
title: title,
|
||||
onSaveComplete: function () {
|
||||
gateway.invalidatePage( title );
|
||||
overlayManager.replaceCurrent(
|
||||
mobile.talk.overlay( title, gateway )
|
||||
);
|
||||
overlayManager.router.navigateTo( null, {
|
||||
// This should be defined in Minerva.
|
||||
path: '#/talk',
|
||||
useReplaceState: true
|
||||
} );
|
||||
// navigate back. the overlay is done with so close it
|
||||
overlayManager.router.back();
|
||||
try {
|
||||
overlayManager.replaceCurrent(
|
||||
mobile.talk.overlay( title, gateway )
|
||||
);
|
||||
overlayManager.router.navigateTo( null, {
|
||||
// This should be defined in Minerva.
|
||||
path: '#/talk',
|
||||
useReplaceState: true
|
||||
} );
|
||||
} catch ( e ) {
|
||||
// the user came directly - there is no overlay to replace
|
||||
// so no overlay to refresh
|
||||
}
|
||||
mw.notify( mw.msg( 'mobile-frontend-talk-topic-feedback' ) );
|
||||
},
|
||||
// T184273 using `currentPage` because 'wgPageName'
|
||||
|
|
Loading…
Reference in New Issue