Skip to content

Escape key when modal not opened #474

@XternalSoft

Description

@XternalSoft

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()"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions