Skip to content

image modal should support ESC key and outer clicking to close the modal #124

Description

@atlasgong

Describe the bug
The image modal only closes when clicking the "X" button.

Expected behavior
It should close when pressing escape on a keyboard or when clicking outside the image.

To Reproduce
Steps to reproduce the behavior:

  1. Go to any post with an image modal
  2. Open the image
  3. Escape, note that it doesn't close the modal
  4. Click outside the image, note that it doesn't close the modal

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Awaiting development...

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions