Fix for bug T76982

Switch uses of 'ev.target' to 'this' to fix cases
where click events come from children of anchor tags

See https://phabricator.wikimedia.org/T76982

Change-Id: I51f186c5d92baa4be46f495d9a7ffd761048e344