Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2020-01-24 05:00:13 +0300
committerThomas Steur <tsteur@users.noreply.github.com>2020-01-24 05:00:13 +0300
commit5322d058d5afcd2c40e76a13762038e05f0795f3 (patch)
tree80b25baf6c16ea608352cccf0d71bcd989efddf0 /plugins
parent5cdecb039600ed93b5fd2de21b68fef3ee730f01 (diff)
Ensure to close visitor popover correctly (#15443)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Live/javascripts/visitorProfile.js29
1 files changed, 21 insertions, 8 deletions
diff --git a/plugins/Live/javascripts/visitorProfile.js b/plugins/Live/javascripts/visitorProfile.js
index 021908f2e8..c533561887 100644
--- a/plugins/Live/javascripts/visitorProfile.js
+++ b/plugins/Live/javascripts/visitorProfile.js
@@ -71,14 +71,27 @@
var self = this,
$element = this.$element;
- $element.on('click', '.visitor-profile-close', function (e) {
- e.preventDefault();
- try {
- $element.tooltip('destroy');
- } catch (e) {}
- broadcast.propagateNewPopoverParameter(false);
- return false;
- });
+ // if there are no popover params in stack, simply close the popover
+ if (!broadcast.popoverParamStack.length) {
+ $element.on('click', '.visitor-profile-close', function (e) {
+ e.preventDefault();
+ try {
+ $element.tooltip('destroy');
+ } catch (e) {
+ }
+ Piwik_Popover.close();
+ });
+ } else {
+ $element.on('click', '.visitor-profile-close', function (e) {
+ e.preventDefault();
+ try {
+ $element.tooltip('destroy');
+ } catch (e) {
+ }
+ broadcast.propagateNewPopoverParameter(false);
+ return false;
+ });
+ }
$element.on('click', '.visitor-profile-toggle-actions', function (e) {
e.preventDefault();