diff --git a/app/RSpade/Core/SPA/Spa.js b/app/RSpade/Core/SPA/Spa.js index b74917547..5c91ac78a 100755 --- a/app/RSpade/Core/SPA/Spa.js +++ b/app/RSpade/Core/SPA/Spa.js @@ -676,13 +676,14 @@ class Spa { // Scroll Restoration #1: Immediate (after action starts) // This occurs synchronously after the action component is created // May fail if page height is insufficient - that's okay, we'll retry later + // Use behavior: 'instant' to override Bootstrap's scroll-behavior: smooth on :root if (opts.scroll) { console_debug('Spa', 'Restoring scroll position (immediate): ' + opts.scroll.x + ', ' + opts.scroll.y); - window.scrollTo(opts.scroll.x, opts.scroll.y); + window.scrollTo({ left: opts.scroll.x, top: opts.scroll.y, behavior: 'instant' }); } else if (opts.scroll === undefined) { // Default: scroll to top for new navigation (only if scroll not explicitly set) console_debug('Spa', 'Scrolling to top (new navigation)'); - window.scrollTo(0, 0); + window.scrollTo({ left: 0, top: 0, behavior: 'instant' }); } // If opts.scroll === null, don't scroll (let Navigation API or browser handle it)