From 469428c0075633f268eb8b4c2beb1f521631854c Mon Sep 17 00:00:00 2001 From: shibao Date: Wed, 25 Jan 2023 20:31:36 -0500 Subject: [PATCH] add topbar.js on form submit and page navigate --- assets/js/app.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assets/js/app.js b/assets/js/app.js index 29c1d067..cb247542 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -47,6 +47,8 @@ Alpine.start() topbar.config({ barColors: { 0: '#29d' }, shadowColor: 'rgba(0, 0, 0, .3)' }) window.addEventListener('phx:page-loading-start', info => topbar.show()) window.addEventListener('phx:page-loading-stop', info => topbar.hide()) +window.addEventListener('submit', info => topbar.show()) +window.addEventListener('beforeunload', info => topbar.show()) // connect if there are any LiveViews on the page liveSocket.connect()