Page MenuHomePhabricator

<maplink> event listener is not attached to elements outside of content
Closed, ResolvedPublic

Description

This code in Kartographer ignores the <maplink> link that (by some magic?) gets placed outside of the page content. See example (I suspect some site customization automatically moves the {{User:Yurik/Sandbox/geo|47.8000|13.0500}} to the very top).

mw.hook( 'wikipage.content' ).add( function ( $content ) {
  ...
  $content.on( 'click', '.mw-kartographer-link', function () {

Event Timeline

Yurik created this task.Jun 9 2016, 4:11 AM
Yurik added a comment.Jun 15 2016, 1:29 AM

@JGirault is it possible to replace $content.on(...) with $.on(...) ?

Yurik moved this task from Backlog to To-do on the Maps-Sprint board.Jun 15 2016, 1:34 AM
JGirault moved this task from To-do to In progress on the Maps-Sprint board.Jun 15 2016, 11:09 PM

Change 294647 had a related patch set uploaded (by JGirault):
Search for maplinks inside and outside of content.

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

Change 294647 merged by jenkins-bot:
Search for maplinks inside and outside of content.

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

Change 294648 had a related patch set uploaded (by Yurik):
Search for maplinks inside and outside of content.

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

Change 294648 merged by jenkins-bot:
Search for maplinks inside and outside of content.

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

Yurik closed this task as Resolved.Jun 16 2016, 12:21 AM
Yurik claimed this task.