Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape key when modal not opened #474

Closed
XternalSoft opened this issue Oct 13, 2024 · 2 comments
Closed

Escape key when modal not opened #474

XternalSoft opened this issue Oct 13, 2024 · 2 comments

Comments

@XternalSoft
Copy link

Hello,

If I hit escape key after installing this package, I get this error

livewire.js?id=cc800bf4:1125 Alpine Expression Error: Cannot read properties of undefined (reading 'name')

Expression: "closeModalOnEscape()"

I don't know if this can be enough of a fix but in the published template I added a condition before closeModalOnEscape()

   x-on:keydown.escape.window="show && closeModalOnEscape()"
@connors511
Copy link

This issue was introduced in 2.0.11. Pinning the version to 2.0.10 makes the error go away for me.

@PhiloNL
Copy link
Contributor

PhiloNL commented Oct 14, 2024

Thanks for reporting, pushed and tagged release https://github.com/wire-elements/modal/releases/tag/2.0.12

@PhiloNL PhiloNL closed this as completed Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants