mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-13 17:56:55 +00:00
renderer: Pass event to behavior for processing
I6d9ff52b introduced a regression where if a logged out user clicks the settings cog then an error is thrown. For now, passing the event to the behavior for further processing is required. However, it's clear that this makes the ext.Popups.PreviewBehavior abstraction leaky. Bug: T162324 Change-Id: I9dea04eb7435f9349e60d477f5701ec5dd655ebd
This commit is contained in:
parent
785a238fce
commit
f80acb978b
BIN
resources/dist/index.js
vendored
BIN
resources/dist/index.js
vendored
Binary file not shown.
BIN
resources/dist/index.js.map
vendored
BIN
resources/dist/index.js.map
vendored
Binary file not shown.
|
@ -2,6 +2,11 @@ var mw = window.mediaWiki,
|
|||
$ = jQuery;
|
||||
|
||||
/**
|
||||
* A collection of event handlers specific to how the user interacts with all
|
||||
* previews. The event handlers are are agnostic to how/when they are bound
|
||||
* //but not to what they are bound//, i.e. the showSettings event handler is
|
||||
* written to be bound to either an `<a>` or `<button>` element.
|
||||
*
|
||||
* @typedef {Object} ext.popups.PreviewBehavior
|
||||
* @property {String} settingsUrl
|
||||
* @property {Function} showSettings
|
||||
|
|
|
@ -280,7 +280,7 @@ function bindBehavior( preview, behavior ) {
|
|||
.click( function ( event ) {
|
||||
event.stopPropagation();
|
||||
|
||||
behavior.showSettings();
|
||||
behavior.showSettings( event );
|
||||
} );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue