Fix weird scroll behavior on back button
This commit is contained in:
@ -104,6 +104,7 @@ import { SITE } from '~/config.mjs';
|
|||||||
};
|
};
|
||||||
|
|
||||||
window.onpageshow = function () {
|
window.onpageshow = function () {
|
||||||
|
document.documentElement.classList.add('motion-safe:scroll-smooth');
|
||||||
const elem = document.querySelector('[data-aw-toggle-menu]');
|
const elem = document.querySelector('[data-aw-toggle-menu]');
|
||||||
if (elem) {
|
if (elem) {
|
||||||
elem.classList.remove('expanded');
|
elem.classList.remove('expanded');
|
||||||
|
@ -16,7 +16,7 @@ const { language = 'en', textDirection = 'ltr' } = SITE;
|
|||||||
---
|
---
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!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>
|
<head>
|
||||||
<MetaTags {...meta} />
|
<MetaTags {...meta} />
|
||||||
</head>
|
</head>
|
||||||
|
Reference in New Issue
Block a user