Page MenuHomePhabricator

Hovercards removes tooltip and wastes API call on link with href="javascript:void(0);"
Closed, ResolvedPublic

Description

Result:

  1. You don't see the tooltip for the sort.
  2. Popups makes its API request for extracts|pageimages|revisions|info for the title "You are currently reading the newest topics first. ...", but there's (probably) no page with that title so it returns "missing".

Expected:
This link is <a href="javascript:void(0);" title="You are currently reading the newest topics first..." ...>. Popups should not bother with such a link. It looks like ext.popups.core.js setupTriggers() intends to exclude hrefs that start with '#' which is often the target for JavaScript enhancements; it needs similar code for hrefs that start with "javascript:" which fixes 2. However, by the time setupTriggers() is called, removeTooltips() has already blanked the title attribute, so the test needs to happen earlier.


Version: master
Severity: minor

Details

Reference
bz68417

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:41 AM
bzimport added a project: Page-Previews.
bzimport set Reference to bz68417.
bzimport added a subscriber: Unknown Object (MLST).

Change 148583 had a related patch set uploaded by Spage:
Don't render popup on "javascript:..." links.

https://gerrit.wikimedia.org/r/148583

Change 148583 merged by Prtksxna:
Don't render popup on "javascript:..." links.

https://gerrit.wikimedia.org/r/148583

Jdlrobson claimed this task.
Jdlrobson subscribed.

Patches were merged. Guessing fixed.