When you click the [ or ] of a reference you get an error, because the click handler assumes that you clicked the link, not the surrounding brackets
function showReference( ev, drawer, page ) { var urlComponents, $dest = $( ev.target ), href = $dest.attr( 'href' ); ev.preventDefault(); // If necessary strip the URL portion of the href so we are left with the // fragment urlComponents = href.split( '#' );
^^ ev.target will be text node '[ '. causing href var to be undefined|null causing an error when trying to .split() it.
Replication
- Visit https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=MediaWiki:Cite_reference_link&mobileaction=toggle_view_mobile
- Click [$3]
*See JS error