@teammodlr/ui-kit 3.0.0-beta.19 → 3.0.0-beta.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teammodlr/ui-kit",
3
- "version": "3.0.0-beta.19",
3
+ "version": "3.0.0-beta.20",
4
4
  "description": "",
5
5
  "main": "lib/index.cjs.js",
6
6
  "module": "lib/index.es.js",
@@ -17,9 +17,9 @@
17
17
  :disable-outside-pointer-events="modal"
18
18
  @open-auto-focus="handleOpenAutoFocus"
19
19
  @escape-key-down="handleEscapeKeyDown"
20
- @pointer-down-outside.prevent
21
- @focus-outside="handleFocusOutside"
22
- @interact-outside.prevent
20
+ @pointer-down-outside="handleOutsideEvent"
21
+ @focus-outside="handleOutsideEvent"
22
+ @interact-outside="handleOutsideEvent"
23
23
  >
24
24
  <FocusScope :trapped="activeFocusTrap" :loop="activeFocusTrap">
25
25
  <slot v-if="$slots.container" name="container" :close="close"></slot>
@@ -247,12 +247,10 @@ export default defineComponent({
247
247
  zIndex.value = nextZIndex();
248
248
  }
249
249
 
250
- function handleFocusOutside(event: Event) {
251
- if (!activeFocusTrap.value) {
252
- return;
250
+ function handleOutsideEvent(event: Event) {
251
+ if (activeFocusTrap.value) {
252
+ event.preventDefault();
253
253
  }
254
-
255
- event.preventDefault();
256
254
  }
257
255
 
258
256
  function handleOpenAutoFocus(event: Event) {
@@ -383,7 +381,7 @@ export default defineComponent({
383
381
  onEnter,
384
382
  handleOpenChange,
385
383
  handleOpenAutoFocus,
386
- handleFocusOutside,
384
+ handleOutsideEvent,
387
385
  isOpen: computed(() => props.open),
388
386
  activeFocusTrap,
389
387
  };