|
@@ -877,12 +877,16 @@ export const refreshView = () => {
|
|
|
const scrollElement = containerEl ? containerEl :
|
|
|
appState.clintNmae === 'colexiu'
|
|
|
? state.osmd.container.parentElement.parentElement
|
|
|
- : state.osmd.container.parentElement
|
|
|
- scrollElement.scrollTo({
|
|
|
- top: top,
|
|
|
- left: 0,
|
|
|
- behavior: detailState.chenkuang ? 'instant' : 'smooth',
|
|
|
- })
|
|
|
+ : state.osmd.container.parentElement;
|
|
|
+ if (detailState.chenkuang) {
|
|
|
+ scrollElement.scrollTop = top
|
|
|
+ } else {
|
|
|
+ scrollElement.scrollTo({
|
|
|
+ top: top,
|
|
|
+ left: 0,
|
|
|
+ behavior: 'smooth',
|
|
|
+ })
|
|
|
+ }
|
|
|
prevDiff = top
|
|
|
}, 100)
|
|
|
}
|