List of steps to reproduce (step by step, including full links if applicable):
- Go to content page with vector 2022 that have TOC on Thai Wikipedia. This page for example.
- Create some <a> element with href="#". eg. $('#bodyContent').prepend($('<a href="#">test link</a>'))
- Click on the newly displayed "test link" link appear on top.
What happens?: The browser will reload the page and tableofcontents={0,1} was appended.
What should have happened instead?: Link should not work and go to the target, as some script will add an action (such as 'mw.util.addPortletLink') by define href as #.
Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.: With the same test, this appear to be found on euwiki and hewiki too which may related to T302046: Build A/B test bucketing infrastructure for the table of contents.