playbook_ui 12.29.0.pre.alpha.play716popoverkitcloseonclickissue893 → 12.29.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d6b07b61b7b29b66f8649816faa1c0cf9f658df0f80ca5c580541f384efe3e3
|
4
|
+
data.tar.gz: af3e2140059844f20d5289e2d56ba87d26c0df0fc2061a271648a2b26d913171
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3154d4f0a1cbc50826fc27e321bb09debfa07735a91b31fe9c99a459b979585a349242bc2f88e12e3d149d8c87c378e1a99faa6872969af257f84df7c1ad1fc
|
7
|
+
data.tar.gz: 5f8e5f58faaaaac3bdc5a97f09cbe21765f2159918d5047825589dbac05a7c71d7321874867d64963c71910f343a93b7298a38af00dcab42e4e50e09e918525e
|
@@ -171,19 +171,17 @@ const PbReactPopover = (props: PbPopoverProps) => {
|
|
171
171
|
|
172
172
|
switch (closeOnClick) {
|
173
173
|
case "outside":
|
174
|
-
if (!targetIsPopover
|
174
|
+
if (!targetIsPopover || targetIsReference) {
|
175
175
|
shouldClosePopover(true);
|
176
176
|
}
|
177
177
|
break;
|
178
178
|
case "inside":
|
179
|
-
if (targetIsPopover) {
|
179
|
+
if (targetIsPopover || targetIsReference) {
|
180
180
|
shouldClosePopover(true);
|
181
181
|
}
|
182
182
|
break;
|
183
183
|
case "any":
|
184
|
-
|
185
|
-
shouldClosePopover(true);
|
186
|
-
}
|
184
|
+
shouldClosePopover(true);
|
187
185
|
break;
|
188
186
|
}
|
189
187
|
},
|
@@ -49,16 +49,13 @@ export default class PbPopover extends PbEnhancedElement {
|
|
49
49
|
checkCloseTooltip() {
|
50
50
|
document.querySelector('body').addEventListener('click', ({ target } ) => {
|
51
51
|
const isTooltipElement = (target as HTMLElement).closest(`#${this.tooltipId}`) !== null
|
52
|
-
const isTriggerElement = (target as HTMLElement).closest(`#${this.triggerElementId}`) !== null
|
53
52
|
|
54
53
|
switch (this.closeOnClick) {
|
55
54
|
case 'any':
|
56
|
-
|
57
|
-
this.hideTooltip()
|
58
|
-
}
|
55
|
+
this.hideTooltip()
|
59
56
|
break
|
60
57
|
case 'outside':
|
61
|
-
if (!isTooltipElement
|
58
|
+
if (!isTooltipElement) {
|
62
59
|
this.hideTooltip()
|
63
60
|
}
|
64
61
|
break
|