Skip to content

Bug: On New post page, hotkeys register even when text input are not focused on #703

Description

@sonngdev

Context

On New post page (/create), try pressing ctrl/cmd + 1 (or 2, 3, 4, etc).

Expected Behavior

If Post body input (markdown-supported text area) is not in focus, browser should switch to the respective tab number 1, 2, 3, 4, etc. (default browser behavior).

If Post body input is in focus, then the respective hotkeys can register (e.g. ctrl/cmd + 1 creates a level 1 heading in markdown (#). For the full list, see /markdoc/editor/hotkeys/hotkeys.markdoc.ts.

Current Behavior

Hotkeys always register, regardless of the focus state of the Post body text input.

Screenshots

Image of said bug

Steps to reproduce

See above.

Additional info

N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions