Amire80 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/201706

Change subject: Hide the contributions callout when clicking outside it
......................................................................

Hide the contributions callout when clicking outside it

Bug: T95001
Change-Id: I7cb815c05d85c770a4f4a5cf6070b61de921e409
---
M modules/campaigns/ext.cx.campaigns.contributionsmenu.js
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/06/201706/1

diff --git a/modules/campaigns/ext.cx.campaigns.contributionsmenu.js 
b/modules/campaigns/ext.cx.campaigns.contributionsmenu.js
index fe60c07..a4b7804 100644
--- a/modules/campaigns/ext.cx.campaigns.contributionsmenu.js
+++ b/modules/campaigns/ext.cx.campaigns.contributionsmenu.js
@@ -62,9 +62,13 @@
 
                function show() {
                        callout.show();
-                       callout.$dialog.on( 'mouseleave', function () {
+
+                       function hideCallout () {
                                callout.hide();
-                       } );
+                       }
+
+                       callout.$dialog.on( 'mouseleave', hideCallout );
+                       $( 'html' ).on( 'click', hideCallout );
 
                        // Not measuring the shown menu events because the 
trigger is 'hover'
                        // and there will be a lot of them.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7cb815c05d85c770a4f4a5cf6070b61de921e409
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to