Skip to content

Bug: isInKeyRange function doesn't filter modifier/navigation keys #1267

@Lumeriol

Description

@Lumeriol

This function is called in autosubmit.ts as isInKeyRange(e, 9, 40) to ignore keys in the legacy keyCode range 9–40 (Tab, Shift, arrows, etc.).

The problem: For modifier/navigation keys, e.key is a multi-character string (e.g. "Shift", "Control", "ArrowLeft"). Since e.key.length !== 1, the code falls through to 0, and 0 >= 9 is always false — so condition will be always false.

Metadata

Metadata

Assignees

No one assigned

    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