popup 0-9 shortcuts read physical key instead of character

Open Beginner friendly
#2,874 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript
Domain
frontend

Research direction

Start in src/js/popup.js at lines 450-458, then reproduce the shortcut with a Norwegian keyboard layout on Linux. Confirm the popup focuses the search field instead of opening container 7 when the relevant character is typed.

Written by the indexing model from the issue text.

Description

bug
Before submitting a bug report
  • I updated to the latest version of Multi-Account Container and tested if I can reproduce the issue
  • I searched for existing reports to see if it hasn't already been reported
Step to reproduce
  1. set keyboard to Norwegian on Linux
  2. type ctrl+.
  3. type a backslash / by hitting shift+7 (norwegian keyboard layout)
Actual behavior

opens container number 7

Expected behavior

focus on search field

Additional informations

https://github.com/mozilla/multi-account-containers/blob/bd1e2107ae513f104b9ee14e527c44f8b9dd1412/src/js/popup.js#L450-L458
seems like the bad code, it should read .key (and compare with "7") instead of .code (comparing "Digit7") etc.

originally reported at https://github.com/mozilla/multi-account-containers/issues/2775#issuecomment-4039536066

Provide a copy of Troubleshooting Information page (optional)

Dominant language
JavaScript
Stars
3.1k
Forks
433
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mozilla/multi-account-containers

All issues in mozilla/multi-account-containers

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.