Skip to content

Escape key is not launching onClose() in reactkit Modal #32

@karendolan

Description

@karendolan

It is common behavior to use the [ESC] key as an alternative to using the mouse or tab to find the "X" close button on a popup. The [ESC] key is not executing the onClose() function in dce-reactkit.

Scenario:

  • Launch a modal with an onClose() option
  • Click the close X icon
  • The onClose() executes
  • Launch a modal wit an onClose() option
  • Hit the [ESC] key
    ACTUAL: the onClose() is not executed
    EXPECTED: the onClose() is executed

Ref: https://github.com/harvard-edtech/dce-reactkit/blob/main/src/components/Modal/index.tsx

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