Chrome seems to be dropping events triggered on external links. This only seems to be a problem in Chrome. IT does not occur in Firefox.
replication steps
- Visit https://en.wikipedia.org in Chrome
- Run the following code in the console to add a link to the top of the page that triggers an event:
$('<a>').attr('href', 'https://wikimedia.org').on( 'click', function () { mw.eventLog.logEvent({ name: 'test' }) }).text('Click me!').prependTo('#bodyContent')- Make sure the network tab preserves events.
- Click the link.
Expected: At some point the event an event should show up in the network tab.
Actual: No event ever shows
Note: If I change the URL to be relative this problem does not occur (in fact usually it sends instantly):
$('<a>').attr('href', '/test').on( 'click', function () { mw.eventLog.logEvent({ name: 'test' }) }).text('Click me!').prependTo('#bodyContent')
