{"action":"created","issue":{"url":"https://api.github.com/repos/google/material-design-lite/issues/4140","repository_url":"https://api.github.com/repos/google/material-design-lite","labels_url":"https://api.github.com/repos/google/material-design-lite/issues/4140/labels{/name}","comments_url":"https://api.github.com/repos/google/material-design-lite/issues/4140/comments","events_url":"https://api.github.com/repos/google/material-design-lite/issues/4140/events","html_url":"https://github.com/google/material-design-lite/issues/4140","id":134566905,"number":4140,"title":"Page refresh causes page to scroll to the top","user":{"login":"davidzchen","id":5283042,"avatar_url":"https://avatars.githubusercontent.com/u/5283042?v=3","gravatar_id":"","url":"https://api.github.com/users/davidzchen","html_url":"https://github.com/davidzchen","followers_url":"https://api.github.com/users/davidzchen/followers","following_url":"https://api.github.com/users/davidzchen/following{/other_user}","gists_url":"https://api.github.com/users/davidzchen/gists{/gist_id}","starred_url":"https://api.github.com/users/davidzchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidzchen/subscriptions","organizations_url":"https://api.github.com/users/davidzchen/orgs","repos_url":"https://api.github.com/users/davidzchen/repos","events_url":"https://api.github.com/users/davidzchen/events{/privacy}","received_events_url":"https://api.github.com/users/davidzchen/received_events","type":"User","site_admin":false},"labels":[{"id":166331782,"url":"https://api.github.com/repos/google/material-design-lite/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":203804288,"url":"https://api.github.com/repos/google/material-design-lite/labels/Layout","name":"Layout","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/google/material-design-lite/milestones/6","html_url":"https://github.com/google/material-design-lite/milestones/V2","labels_url":"https://api.github.com/repos/google/material-design-lite/milestones/6/labels","id":1235462,"number":6,"title":"V2","description":"","creator":{"login":"addyosmani","id":110953,"avatar_url":"https://avatars.githubusercontent.com/u/110953?v=3","gravatar_id":"","url":"https://api.github.com/users/addyosmani","html_url":"https://github.com/addyosmani","followers_url":"https://api.github.com/users/addyosmani/followers","following_url":"https://api.github.com/users/addyosmani/following{/other_user}","gists_url":"https://api.github.com/users/addyosmani/gists{/gist_id}","starred_url":"https://api.github.com/users/addyosmani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/addyosmani/subscriptions","organizations_url":"https://api.github.com/users/addyosmani/orgs","repos_url":"https://api.github.com/users/addyosmani/repos","events_url":"https://api.github.com/users/addyosmani/events{/privacy}","received_events_url":"https://api.github.com/users/addyosmani/received_events","type":"User","site_admin":false},"open_issues":43,"closed_issues":47,"state":"open","created_at":"2015-07-31T17:16:39Z","updated_at":"2016-10-26T14:25:39Z","due_on":"2021-05-13T04:00:00Z","closed_at":null},"comments":11,"created_at":"2016-02-18T12:22:30Z","updated_at":"2016-11-22T17:22:03Z","closed_at":null,"body":"Usually, after refreshing a page, the page still stays at the same position prior to the refresh. However, I noticed with MDL, the page would jump back to the top after refresh. Is this intended?\n"},"comment":{"url":"https://api.github.com/repos/google/material-design-lite/issues/comments/262305524","html_url":"https://github.com/google/material-design-lite/issues/4140#issuecomment-262305524","issue_url":"https://api.github.com/repos/google/material-design-lite/issues/4140","id":262305524,"user":{"login":"JeffAlieffson","id":8855576,"avatar_url":"https://avatars.githubusercontent.com/u/8855576?v=3","gravatar_id":"","url":"https://api.github.com/users/JeffAlieffson","html_url":"https://github.com/JeffAlieffson","followers_url":"https://api.github.com/users/JeffAlieffson/followers","following_url":"https://api.github.com/users/JeffAlieffson/following{/other_user}","gists_url":"https://api.github.com/users/JeffAlieffson/gists{/gist_id}","starred_url":"https://api.github.com/users/JeffAlieffson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeffAlieffson/subscriptions","organizations_url":"https://api.github.com/users/JeffAlieffson/orgs","repos_url":"https://api.github.com/users/JeffAlieffson/repos","events_url":"https://api.github.com/users/JeffAlieffson/events{/privacy}","received_events_url":"https://api.github.com/users/JeffAlieffson/received_events","type":"User","site_admin":false},"created_at":"2016-11-22T17:22:03Z","updated_at":"2016-11-22T17:22:03Z","body":"Thank U viotti. It works for hash, even if I refresh the page\r\nI changed your code slightly to make it JQuery free:\r\n\r\n```\r\nfunction hasClass( target, className ) {\r\n    return new RegExp('(\\\\s|^)' + className + '(\\\\s|$)').test(target.className);\r\n}\r\ndocument.addEventListener('mdl-componentupgraded', function(e) {\r\n        if (hasClass(e.target, 'mdl-layout')) {            \r\n            if (window.location.hash)\r\n                window.location = window.location.hash;\r\n            alert('upgraded!');\r\n        }\r\n    });\r\n```"}}
{"actor":{"display_login":"JeffAlieffson"}}