@getflip/swirl-components 0.118.1 → 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.
package/components.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2023-12-01T15:29:32",
2
+ "timestamp": "2023-12-12T14:00:24",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "3.3.1",
@@ -105,7 +105,7 @@ const SwirlPopover = class {
105
105
  }
106
106
  }
107
107
  onWindowClick(event) {
108
- if (!this.active) {
108
+ if (!this.active || this.closing) {
109
109
  return;
110
110
  }
111
111
  const target = event.target;
@@ -115,7 +115,7 @@ const SwirlPopover = class {
115
115
  .some((el) => Boolean(el) && el instanceof Node
116
116
  ? this.el.contains(el)
117
117
  : false);
118
- const clickedTrigger = target === this.triggerEl;
118
+ const clickedTrigger = target === this.triggerEl || this.triggerEl.contains(target);
119
119
  if (!clickedChild && !clickedShadowChild && !clickedTrigger) {
120
120
  this.close();
121
121
  }
@@ -271,8 +271,7 @@ const SwirlPopoverTrigger = class {
271
271
  constructor(hostRef) {
272
272
  index.registerInstance(this, hostRef);
273
273
  this.popoverOpen = false;
274
- this.onClick = (event) => {
275
- event.stopPropagation();
274
+ this.onClick = () => {
276
275
  const popoverEl = this.getPopoverEl();
277
276
  if (!Boolean(popoverEl)) {
278
277
  return;