jenkins-bot has submitted this change and it was merged.

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(+), 4 deletions(-)

Approvals:
  Santhosh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/campaigns/ext.cx.campaigns.contributionsmenu.js 
b/modules/campaigns/ext.cx.campaigns.contributionsmenu.js
index d0dceef..a41388d 100644
--- a/modules/campaigns/ext.cx.campaigns.contributionsmenu.js
+++ b/modules/campaigns/ext.cx.campaigns.contributionsmenu.js
@@ -60,12 +60,14 @@
 
                callout = $trigger.data( 'callout' );
 
+               function hide() {
+                       callout.hide();
+               }
+
                function show() {
                        callout.show();
-                       callout.$dialog.on( 'mouseleave', function () {
-                               callout.hide();
-                       } );
-
+                       callout.$dialog.one( 'mouseleave', hide );
+                       $( document ).one( 'click', hide );
                        // Not measuring the shown menu events because the 
trigger is 'hover'
                        // and there will be a lot of them.
                        // But can be easily track if somebody use it to reach 
CX.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7cb815c05d85c770a4f4a5cf6070b61de921e409
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Amire80 <amir.ahar...@mail.huji.ac.il>
Gerrit-Reviewer: Nikerabbit <niklas.laxst...@gmail.com>
Gerrit-Reviewer: Santhosh <santhosh.thottin...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to