In version 1.26, the URL ("Www.example.com#xx"), followed by the back, is automatically tuned to the top because the default settings for angular
As long as the config is injected into the $anchorscrollprovider, then run this on the line $anchorscrollprovider.disableautoscrolling ();
Oddly enough, the Chrome browser would have been no problem, and this time it would not have been necessary to change the default settings, but it would have been seen in the chrome viewer.
Misunderstanding:
When Chrome is Window.history.back, it will immediately get the current pageyoffeset and then go back to the location
The FF Viewer will not be able to get the current pageyoffset, but can still go back to the position before the hash.
The above process can go back to the original position, but in taking pageyoffset is not the same.
In the original code will find that angular is going to scroll to the top, but when the default is not set to disable, chrome should be to scroll to the top, but no (this is a bug)
* This test is only done in Chrome and Firefox
Browser logic
var scrolltop = window.pageyoffset| | Document.documentElement.scrollTop | | Document.body.scrolltop;when History Back:chrome First run Eventfirefox first run scroll
Angular 1.26 version window.history.back () Auto go to top