diff --git a/ema.cabal b/ema.cabal index 228c9b3..55e12d4 100644 --- a/ema.cabal +++ b/ema.cabal @@ -1,6 +1,6 @@ cabal-version: 2.4 name: ema -version: 0.7.1.0 +version: 0.7.1.1 license: AGPL-3.0-only copyright: 2021 Sridhar Ratnakumar maintainer: srid@srid.ca diff --git a/src/Ema/Server.hs b/src/Ema/Server.hs index d2a80f5..cb98105 100644 --- a/src/Ema/Server.hs +++ b/src/Ema/Server.hs @@ -359,7 +359,10 @@ wsClientShim = routeVisible = document.location.pathname; } if (window.location.hash) { - window.location.hash = window.location.hash; + var el = document.querySelector(window.location.hash); + if (el !== null) { + el.scrollIntoView({ behavior: 'smooth' }); + } } watchCurrentRoute(); };