{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/website/issues/8186","repository_url":"https://api.github.com/repos/kubernetes/website","labels_url":"https://api.github.com/repos/kubernetes/website/issues/8186/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/website/issues/8186/comments","events_url":"https://api.github.com/repos/kubernetes/website/issues/8186/events","html_url":"https://github.com/kubernetes/website/issues/8186","id":317724477,"number":8186,"title":"location.reload() scrolls to top","user":{"login":"bep","id":394382,"avatar_url":"https://avatars1.githubusercontent.com/u/394382?v=4","gravatar_id":"","url":"https://api.github.com/users/bep","html_url":"https://github.com/bep","followers_url":"https://api.github.com/users/bep/followers","following_url":"https://api.github.com/users/bep/following{/other_user}","gists_url":"https://api.github.com/users/bep/gists{/gist_id}","starred_url":"https://api.github.com/users/bep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bep/subscriptions","organizations_url":"https://api.github.com/users/bep/orgs","repos_url":"https://api.github.com/users/bep/repos","events_url":"https://api.github.com/users/bep/events{/privacy}","received_events_url":"https://api.github.com/users/bep/received_events","type":"User","site_admin":false},"labels":[{"id":422807566,"url":"https://api.github.com/repos/kubernetes/website/labels/P2","name":"P2","color":"fbca04","default":false},{"id":764235355,"url":"https://api.github.com/repos/kubernetes/website/labels/sig/docs","name":"sig/docs","color":"d2b48c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-25T17:32:58Z","updated_at":"2018-05-09T04:10:42Z","closed_at":null,"author_association":"COLLABORATOR","body":"<!-- Thanks for filing an issue! Before submitting, please fill in the following information. -->\r\n\r\n<!--Required Information-->\r\n\r\n**This is a...** \r\n<!-- choose one by changing [ ] to [x] -->\r\n- [ ] Feature Request\r\n- [x] Bug Report\r\n\r\n**Problem:**\r\n\r\nThis may not be a problem for the end user reading the docs (though I suspect some of the flickerings on load may be a symptom of the same cause). \r\n\r\nTo reproduce:\r\n\r\n1. In Chrome (tested on my MacBook), go to https://kubernetes.io/docs/reference/deprecation-policy/ or any other page of some length, and scroll down. \r\n2. In the JavaScript console, type \"window.location.reload();\" and hit enter.\r\n3. Notice the page scrolling to top.\r\n\r\nNote that in Safari everything is OK.\r\n\r\nI found this issue when doing some migration work of this site to Hugo. Hugo rebuilds the site in milliseconds, and takes special care to do `window.location.reload();` if possible. But this issue makes editing long documents much less pleasurable than it could be. The current workaround is to use another browser, but Chrome seems like a common choice for many.\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/website/issues/comments/387614456","html_url":"https://github.com/kubernetes/website/issues/8186#issuecomment-387614456","issue_url":"https://api.github.com/repos/kubernetes/website/issues/8186","id":387614456,"user":{"login":"vllry","id":10716925,"avatar_url":"https://avatars2.githubusercontent.com/u/10716925?v=4","gravatar_id":"","url":"https://api.github.com/users/vllry","html_url":"https://github.com/vllry","followers_url":"https://api.github.com/users/vllry/followers","following_url":"https://api.github.com/users/vllry/following{/other_user}","gists_url":"https://api.github.com/users/vllry/gists{/gist_id}","starred_url":"https://api.github.com/users/vllry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vllry/subscriptions","organizations_url":"https://api.github.com/users/vllry/orgs","repos_url":"https://api.github.com/users/vllry/repos","events_url":"https://api.github.com/users/vllry/events{/privacy}","received_events_url":"https://api.github.com/users/vllry/received_events","type":"User","site_admin":false},"created_at":"2018-05-09T04:10:42Z","updated_at":"2018-05-09T04:10:42Z","author_association":"NONE","body":"I did some digging, but didn't get very far (it's also an issue in Firefox, but Firefox scrolls down 100px or so from the top). It sounds like it's an issue with a scrolling div, that the browser just isn't tracking.\r\n\r\nOther than digging through div behavior, it seems like the other option is a hack to store scroll position on events, and jump to that position on page load."}}
{"actor":{"display_login":"vllry"}}