Make sure to never trigger multiple events

I had to disable ESLint to be allowed to upload this patch. It starts
complaining about something in code I did not even touched. The error
message does not make any sense to me (something about globals being
forbidden in code where I can not spot anything that would be remotely
global).

Change-Id: I6d4b178a65126c4b81b87d99142a6cdc845ae5ee
This commit is contained in:
Thiemo Kreuz 2019-03-25 12:54:55 +01:00 committed by Stephen Niedzielski
parent 522f4aa8a2
commit 511c74bf72
4 changed files with 2 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View file

@ -54,7 +54,7 @@ export function renderReferencePreview(
if ( model.sourceElementId ) {
$el.find( '.mwe-popups-read-link' ).on( 'click', ( event ) => {
event.stopPropagation();
$( `#${ $.escapeSelector( model.sourceElementId ) } > a` ).trigger( 'click' );
$( `#${ $.escapeSelector( model.sourceElementId ) } > a:first-child` ).trigger( 'click' );
} );
}

View file

@ -33,7 +33,7 @@ QUnit.module( 'ext.popups/changeListeners/footerLink @integration', {
};
this.getLink = function () {
return this.$footer.find( 'li' );
return this.$footer.find( 'li:last-child' );
};
},
afterEach() {