MaxSem has submitted this change and it was merged.

Change subject: Fix closing the media viewer
......................................................................


Fix closing the media viewer

Properly inherit Overlay events and defaults

Bug: T92346
Change-Id: I2880d070b0de04928f40320536b02a483d2c2681
(cherry picked from commit ba7af25a3c0733d7a119c75ca5d9a0cc6e35ab3e)
---
M javascripts/modules/mediaViewer/ImageOverlay.js
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Alex Monk: Looks good to me, approved
  MaxSem: Verified



diff --git a/javascripts/modules/mediaViewer/ImageOverlay.js 
b/javascripts/modules/mediaViewer/ImageOverlay.js
index f33dd23..733899e 100644
--- a/javascripts/modules/mediaViewer/ImageOverlay.js
+++ b/javascripts/modules/mediaViewer/ImageOverlay.js
@@ -28,7 +28,7 @@
                 * @cfg {String} defaults.licenseLinkMsg Link to license 
information in media viewer.
                 * @cfg {Thumbnail[]} defaults.thumbnails a list of thumbnails 
to browse
                 */
-               defaults: {
+               defaults: $.extend( {}, Overlay.prototype.defaults, {
                        cancelButton: new Icon( {
                                tagName: 'button',
                                // Uses a dark theme so swap out the icon
@@ -39,12 +39,12 @@
                        detailsMsg: mw.msg( 'mobile-frontend-media-details' ),
                        licenseLinkMsg: mw.msg( 
'mobile-frontend-media-license-link' ),
                        thumbnails: []
-               },
+               } ),
 
                /** @inheritdoc */
-               events: {
+               events: $.extend( {}, Overlay.prototype.events, {
                        'click .image-wrapper': 'onToggleDetails'
-               },
+               } ),
 
                /** @inheritdoc */
                preRender: function ( options ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/196448
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2880d070b0de04928f40320536b02a483d2c2681
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: wmf/1.25wmf21
Gerrit-Owner: Bmansurov <bmansu...@wikimedia.org>
Gerrit-Reviewer: Alex Monk <kren...@gmail.com>
Gerrit-Reviewer: MaxSem <maxsem.w...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to