Chrome remembers scroll position

后端 未结 5 810
情话喂你
情话喂你 2020-12-05 04:52

I\'m running into a problem that\'s actually a \"feature\" on Chrome. As most of you might know, Chrome remembers a scroll position that it returns to, whenever you come bac

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-05 05:34

    x = 0;  //horizontal coord
    y = document.height; //vertical coord
    window.scroll(x,y);
    

    Some Javascript like that may very well be able to be manipulated to stop the auto scrolling.

    It depends though, are you happy for the scroll to be simply set to automatically go to the top, or are you actually looking for the Chrome standard option to take the page to last scroll position, to be turned off completely?

    What are you currently attempting to use for scrollTop()?

提交回复
热议问题