Skip to content

Disable close on away and escape if form is dirty? #71

@seabasss

Description

@seabasss

Is there any way to let you close the modal by clicking outside or pressing escape, but only if nothing has changed in the form?

Would be cool to do something like this:

public function closeModalOnEscape():
{
    return !$this->post->isDirty();
}

Or let you show another modal saying "You have unsaved changes. Are you sure you want to close the modal?" if the form is dirty.

Any ideas? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions