Skip to content

click inside modal closes it #2

@brianally

Description

@brianally

A form inside the modal, for example, will be useless because any click inside the modal will close it immediately. For any practical use besides a simple "click LITERALLY anywhere to close" msg popup, you need to remove the modal frame from within the background.

{{#if enabled}}
  <div {{action 'toggleModal'}} class="modal-background"></div>
  <div class="modal-frame">
      <div class="modal-title">
        {{title}}
      </div>
      <div class="modal-body">
        {{yield}}
      </div>
    </div>
{{/if}}

At least, I couldn't find any other practical way to stop the child's click from bubbling.

Thanks for the tut. The "expose" bit was exactly what i needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions