@anweb/nuxt-ancore 1.16.12 → 1.16.13

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/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "AnCore",
3
3
  "configKey": "ancore",
4
- "version": "1.16.12",
4
+ "version": "1.16.13",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -20,6 +20,9 @@ const active = ref(false);
20
20
  const target = ref(null);
21
21
  let raf = 0;
22
22
  let mouseDownOnBackdrop = false;
23
+ const onMouseDown = (e) => {
24
+ mouseDownOnBackdrop = e.target === e.currentTarget;
25
+ };
23
26
  const onSwipeStart = () => {
24
27
  active.value = canSwipe.value;
25
28
  };
@@ -68,7 +71,9 @@ onMounted(() => {
68
71
  aria-modal="true"
69
72
  class="an-dialog -flex -flex__column"
70
73
  :class="[{ '-fullscreen': config.fullscreen }, config.class]"
71
- @click.self="!config.fullscreen && Dialogs.close(props.dialog)"
74
+ @mousedown="onMouseDown"
75
+ @click.self="mouseDownOnBackdrop && !config.fullscreen && Dialogs.close(props.dialog);
76
+ mouseDownOnBackdrop = false"
72
77
  >
73
78
  <component
74
79
  ref="refDialog"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anweb/nuxt-ancore",
3
- "version": "1.16.12",
3
+ "version": "1.16.13",
4
4
  "description": "AnCore Nuxt module",
5
5
  "repository": "https://github.com/ANLTD/ancore",
6
6
  "license": "MIT",