mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-23 23:24:39 +00:00
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:
parent
522f4aa8a2
commit
511c74bf72
BIN
resources/dist/index.js
vendored
BIN
resources/dist/index.js
vendored
Binary file not shown.
BIN
resources/dist/index.js.map.json
vendored
BIN
resources/dist/index.js.map.json
vendored
Binary file not shown.
|
@ -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' );
|
||||
} );
|
||||
}
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue