Cannot activate modal after scroll

I am using the Discourse Header Links plugin to implement some additional actions in the header. In one of these actions I would like to trigger a modal window to open, and not redirect. I do this by configuring the plugin like so:

This works fine, however if I visit a topic (e.g. http://localhost:3000/t/welcome-to-the-zone) and scroll downwards so the route changes (e.g http://localhost:3000/t/welcome-to-the-thing-zopne/1/3), then from that point onward the modal can no longer be opened.

Why is this happening? Help would be appreciated.