Skip to content
This repository was archived by the owner on Jun 14, 2023. It is now read-only.
This repository was archived by the owner on Jun 14, 2023. It is now read-only.

How to intercept keypress events in the text input field in the example modal? #70

@hakonhagland

Description

@hakonhagland

Hi, I would like to intercept when enter is pressed in the text input field in the example modal:

https://marcus.se.net/obsidian-plugin-docs/user-interface/modals#accept-user-input

then I can allow the modal to be closed also when enter is pressed, and the user do not have to press the "Submit" button.

How can this be done? Should it be added to the plugin documentation?

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