Fix weird scroll behavior on back button

This commit is contained in:
prototypa
2023-01-08 12:33:13 -05:00
parent 8ce8421334
commit 8990e6adc3
2 changed files with 2 additions and 1 deletions

View File

@ -104,6 +104,7 @@ import { SITE } from '~/config.mjs';
};
window.onpageshow = function () {
document.documentElement.classList.add('motion-safe:scroll-smooth');
const elem = document.querySelector('[data-aw-toggle-menu]');
if (elem) {
elem.classList.remove('expanded');