Page MenuHomePhabricator

Links in <sup> tags are unclickable in mobile version if they aren’t references
Closed, ResolvedPublic


Steps to reproduce:

  1. Find any article with [citation needed] and open it in mobile version.
  2. Try to click on the links that aren’t references.

Problems in mobile version are appearing with all of templates that use any links in <sup> tags in them: e. g.,

Problematic code:

var $refs = page.$('sup a');
if ($refs.length) {
    $'click').on('click', {
        page: page
    }, onClickReference);
    page.$('.mw-cite-backlink a').off('click');

Please change jQuery selector to $('.reference a') or something similar, bug is fairly easy to fix.

Event Timeline

TheDJ added a subscriber: TheDJ.

$('sup a')

Right... this is exactly why we have semantic classes and generally don't rely on element tags when writing selectors. Also, parsoid uses span.reference, instead of sup.reference.. Not entirely sure why that is, or if that matters for this particular situation.

ovasileva triaged this task as Medium priority.Jan 25 2017, 5:57 PM
Jdlrobson added a subscriber: Jdlrobson.

I would like to see this fixed. Can review if anyone can get round to writing a patch quicker than us.

Change 343903 had a related patch set uploaded (by EddieGP):
[mediawiki/extensions/MobileFrontend] Change jQuery selector for references

Change 343903 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend] Change jQuery selector for references

bmansurov removed bmansurov as the assignee of this task.
bmansurov added a subscriber: bmansurov.

Tested on Cane_knife on the beta cluster. Clicking on [citation needed] takes me to Wikipedia:Citation_needed.

Clicking on the same link at Cane_knife on production doesn't do anything (which will get fixed when the patch makes its way to the production servers).