@getflip/swirl-components 0.118.0 → 0.118.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -98,7 +98,7 @@ export class SwirlPopover {
98
98
  }
99
99
  }
100
100
  onWindowClick(event) {
101
- if (!this.active) {
101
+ if (!this.active || this.closing) {
102
102
  return;
103
103
  }
104
104
  const target = event.target;
@@ -108,7 +108,7 @@ export class SwirlPopover {
108
108
  .some((el) => Boolean(el) && el instanceof Node
109
109
  ? this.el.contains(el)
110
110
  : false);
111
- const clickedTrigger = target === this.triggerEl;
111
+ const clickedTrigger = target === this.triggerEl || this.triggerEl.contains(target);
112
112
  if (!clickedChild && !clickedShadowChild && !clickedTrigger) {
113
113
  this.close();
114
114
  }
@@ -2,8 +2,7 @@ import { h, Host } from "@stencil/core";
2
2
  export class SwirlPopoverTrigger {
3
3
  constructor() {
4
4
  this.popoverOpen = false;
5
- this.onClick = (event) => {
6
- event.stopPropagation();
5
+ this.onClick = () => {
7
6
  const popoverEl = this.getPopoverEl();
8
7
  if (!Boolean(popoverEl)) {
9
8
  return;