Skip to content

Modal state is not inactive after modal is closed #96

@akrawchyk

Description

@akrawchyk

The undelegateModalEvents function is not called when a modal is canceled or closed for another reason. It looks as though the modal checks if we have a viewContainer, here

if @regionEnabled
and here
if @regionEnabled
, except @regionEnabled does not seem to be set anywhere else in the code. That means destroy will always be called on a successful triggerCancel and triggerSubmit.

So, I think we should call undelegateModalEvents every time destroy is called in order to always remove events from the inactive modal and return the modal state back to inactive (@active = false called only in the undelegateModelEvents function here

).

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