@threadlabs/looma 0.22.7 → 0.22.8

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.
@@ -66,7 +66,9 @@ export default function controller(host) {
66
66
  const onClick = (event) => {
67
67
  if (host.state.dismissible && event.target === dialog) dispatchClose("light-dismiss", trigger());
68
68
  };
69
- const onClose = () => {
69
+ // Only the dialog's own close: a tooltip, menu, or popover inside it reports "close" too, and it bubbles.
70
+ const onClose = (event) => {
71
+ if (event.target !== dialog) return;
70
72
  if (!suppressNativeClose && host.state.internalOpen) dispatchClose("action", trigger());
71
73
  };
72
74
  dialog.addEventListener("cancel", onCancel);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threadlabs/looma",
3
- "version": "0.22.7",
3
+ "version": "0.22.8",
4
4
  "type": "module",
5
5
  "description": "Looma components as HTML, Vue, and plain DOM, with design tokens.",
6
6
  "license": "MIT",