bloodchen on which page are you trying to add that element?
On the discussion page / post stream, there are a lot of event listeners and custom scroll code to handle infinite scrolling so there's a good chance of conflict with whatever you do.
If you're adding something inside of the post stream, you can use the built-in methods to scroll to a given post number or element index.
More generally it could be something to do with Mithril single-page application routing. Depending how you inserted the link to that anchor, maybe that link was applied the routing script. Links inside of the post content shouldn't be routed without any third-party extension though.