{"action":"created","issue":{"url":"https://api.github.com/repos/lhorie/mithril.js/issues/567","labels_url":"https://api.github.com/repos/lhorie/mithril.js/issues/567/labels{/name}","comments_url":"https://api.github.com/repos/lhorie/mithril.js/issues/567/comments","events_url":"https://api.github.com/repos/lhorie/mithril.js/issues/567/events","html_url":"https://github.com/lhorie/mithril.js/issues/567","id":69050389,"number":567,"title":"How to override scroll-to-top on route transition?","user":{"login":"tobscure","id":128862,"avatar_url":"https://avatars.githubusercontent.com/u/128862?v=3","gravatar_id":"","url":"https://api.github.com/users/tobscure","html_url":"https://github.com/tobscure","followers_url":"https://api.github.com/users/tobscure/followers","following_url":"https://api.github.com/users/tobscure/following{/other_user}","gists_url":"https://api.github.com/users/tobscure/gists{/gist_id}","starred_url":"https://api.github.com/users/tobscure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobscure/subscriptions","organizations_url":"https://api.github.com/users/tobscure/orgs","repos_url":"https://api.github.com/users/tobscure/repos","events_url":"https://api.github.com/users/tobscure/events{/privacy}","received_events_url":"https://api.github.com/users/tobscure/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-04-17T02:42:43Z","updated_at":"2015-04-19T00:39:03Z","closed_at":null,"body":"Mithril automatically scrolls to the top when m.route is called (via computePostRedrawHook). I would like to prevent this from happening and immediately scroll down to a certain point as soon as the page is rendered.\r\n\r\nI would think I could do this in a node's config function, but it seems that computePostRedrawHook is called after the config functions are run. The only other way I can think of is to use setTimeout, but that results in a slight delay which isn't nice."},"comment":{"url":"https://api.github.com/repos/lhorie/mithril.js/issues/comments/94216192","html_url":"https://github.com/lhorie/mithril.js/issues/567#issuecomment-94216192","issue_url":"https://api.github.com/repos/lhorie/mithril.js/issues/567","id":94216192,"user":{"login":"tobscure","id":128862,"avatar_url":"https://avatars.githubusercontent.com/u/128862?v=3","gravatar_id":"","url":"https://api.github.com/users/tobscure","html_url":"https://github.com/tobscure","followers_url":"https://api.github.com/users/tobscure/followers","following_url":"https://api.github.com/users/tobscure/following{/other_user}","gists_url":"https://api.github.com/users/tobscure/gists{/gist_id}","starred_url":"https://api.github.com/users/tobscure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobscure/subscriptions","organizations_url":"https://api.github.com/users/tobscure/orgs","repos_url":"https://api.github.com/users/tobscure/repos","events_url":"https://api.github.com/users/tobscure/events{/privacy}","received_events_url":"https://api.github.com/users/tobscure/received_events","type":"User","site_admin":false},"created_at":"2015-04-19T00:39:03Z","updated_at":"2015-04-19T00:39:03Z","body":"@lhorie if you think a preConfigHook sounds like a good solution, I can do a PR?"}}