x-show doesn't work with dialog #4386
Unanswered
florian-sun
asked this question in
5. Bugs
Replies: 1 comment 2 replies
-
That's not the way a dialog element works: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog X-show just applies "display: none" when hidden. You must use the native api to control a dialog element. <div x-data="{ open: true }">
<button @click="open = !open">toggle</button>
<dialog x-effect="open ? $el.show() : $el.close()">
<div>Something</div>
</dialog>
</div> |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The following html shd display the text "Something" but it doesn't
Beta Was this translation helpful? Give feedback.
All reactions