Fix weird scroll behavior on back button
This commit is contained in:
@ -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');
|
||||
|
@ -16,7 +16,7 @@ const { language = 'en', textDirection = 'ltr' } = SITE;
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang={language} dir={textDirection} class="motion-safe:scroll-smooth 2xl:text-[20px]">
|
||||
<html lang={language} dir={textDirection} class="2xl:text-[20px]">
|
||||
<head>
|
||||
<MetaTags {...meta} />
|
||||
</head>
|
||||
|
Reference in New Issue
Block a user