From df9be1b063e1c0a84da1c40a19035266c35825b4 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Mon, 5 Oct 2020 16:25:23 -0400 Subject: [PATCH] Move drawer hide and modal close into `onNewRoute` Let's stay consistent with previous behavior, and run these on "internal route change" (same component handles different route) as well as on initial render of a page component. --- js/src/common/components/Page.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/src/common/components/Page.js b/js/src/common/components/Page.js index a0bc67039..b0b47d822 100644 --- a/js/src/common/components/Page.js +++ b/js/src/common/components/Page.js @@ -12,9 +12,6 @@ export default class Page extends Component { this.onNewRoute(); - app.drawer.hide(); - app.modal.close(); - /** * A class name to apply to the body while the route is active. * @@ -32,6 +29,9 @@ export default class Page extends Component { onNewRoute() { app.previous = app.current; app.current = new PageState(this.constructor, { routeName: this.attrs.routeName }); + + app.drawer.hide(); + app.modal.close(); } oncreate(vnode) {