From 89f306ed47793acd57ed136144e4cc4e08a2874c Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Wed, 13 Nov 2024 02:46:57 +0100 Subject: [PATCH] Scrolling works when a disconnection occurs. --- src/App/Container.purs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/App/Container.purs b/src/App/Container.purs index 5ba32ec..1790ea5 100644 --- a/src/App/Container.purs +++ b/src/App/Container.purs @@ -66,6 +66,8 @@ import App.Message.AuthenticationDaemon as AuthD import App.Log as AppLog import App.WS as WS +import Scroll (scrollToTop) + import App.Page.Authentication as AI import App.Page.Registration as RI import App.Page.MailValidation as MVI @@ -524,6 +526,7 @@ handleAction = case _ of WS.WSJustClosed -> do H.modify_ _ { are_we_connected_to_dnsmanagerd = false } + H.liftEffect scrollToTop handleAction $ Log $ ErrorLog "You just got disconnected from authd." WS.Log message -> handleAction $ Log message WS.KeepAlive -> handleAction $ KeepAlive $ Left unit @@ -708,6 +711,7 @@ handleAction = case _ of handleAction AuthenticateToDNSManager WS.WSJustClosed -> do H.modify_ _ { are_we_connected_to_dnsmanagerd = false } + H.liftEffect scrollToTop handleAction $ Log $ ErrorLog "You just got disconnected from dnsmanagerd." WS.Log message -> handleAction $ Log message WS.KeepAlive -> handleAction $ KeepAlive $ Right unit