File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/Components/Web.JS/src/Services Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -111,21 +111,22 @@ function onDocumentClick(event: MouseEvent) {
111111 }
112112
113113 handleClickForNavigationInterception ( event , absoluteInternalHref => {
114+ const originalLocation = location . href ;
114115 saveScrollPosition ( ) ;
116+
115117 const shouldScrollToHash = isSamePageWithHash ( absoluteInternalHref ) ;
118+ history . pushState ( null , /* ignored title */ '' , absoluteInternalHref ) ;
116119
117120 if ( shouldScrollToHash ) {
118121 performScrollToElementOnTheSamePage ( absoluteInternalHref ) ;
119122 } else {
120- let isSelfNavigation = isForSamePath ( absoluteInternalHref , location . href ) ;
123+ let isSelfNavigation = isForSamePath ( absoluteInternalHref , originalLocation ) ;
121124 performEnhancedPageLoad ( absoluteInternalHref , /* interceptedLink */ true ) ;
122125 if ( ! isSelfNavigation ) {
123126 resetScrollAfterNextBatch ( ) ;
124127 resetScrollIfNeeded ( ) ;
125128 }
126129 }
127-
128- history . pushState ( null , /* ignored title */ '' , absoluteInternalHref ) ;
129130 } ) ;
130131}
131132
You can’t perform that action at this time.
0 commit comments