Skip to content

Commit

Permalink
fix: emits event not firing up correctly (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
zernonia authored Aug 23, 2023
1 parent dba90b8 commit 111a606
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/radix-vue/src/Dialog/Dialog.story.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function handleEvent() {
<DialogContent
:is-escape-key-down-default="true"
class="data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed top-[50%] left-[50%] max-h-[85vh] w-[90vw] max-w-[450px] translate-x-[-50%] translate-y-[-50%] rounded-[6px] bg-white p-[25px] shadow-[hsl(206_22%_7%_/_35%)_0px_10px_38px_-10px,_hsl(206_22%_7%_/_20%)_0px_10px_20px_-15px] focus:outline-none"
@escapeKeyDown="handleEvent"
@pointer-down-outside.prevent
>
<DialogTitle class="text-mauve12 m-0 text-[17px] font-medium">
Edit profile
Expand Down
4 changes: 4 additions & 0 deletions packages/radix-vue/src/Dialog/DialogContentImpl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ const context = inject(DIALOG_INJECTION_KEY)
:aria-labelledby="context!.titleId"
:data-state="getOpenState(context!.open.value)"
@dismiss="context?.onOpenChange(false)"
@escape-key-down="emits('escapeKeyDown', $event)"
@focus-outside="emits('focusOutside', $event)"
@interact-outside="emits('interactOutside', $event)"
@pointer-down-outside="emits('pointerDownOutside', $event)"
>
<slot />
</DismissableLayer>
Expand Down

0 comments on commit 111a606

Please sign in to comment.