diff --git a/src/Elastic.Markdown/Assets/main.ts b/src/Elastic.Markdown/Assets/main.ts index 99d748dac..0f20fe427 100644 --- a/src/Elastic.Markdown/Assets/main.ts +++ b/src/Elastic.Markdown/Assets/main.ts @@ -56,6 +56,7 @@ document.addEventListener('htmx:beforeRequest', function (event) { document.body.addEventListener('htmx:oobBeforeSwap', function (event) { // This is needed to scroll to the top of the page when the content is swapped if ( + event.target.id === 'main-container' || event.target.id === 'markdown-content' || event.target.id === 'content-container' ) {