Keyboard shortcuts being triggered from search bar modal when searching in a wiki page
Summary
When reading a wiki page, I wanted to jump to another repository using "Search or go to". After starting pressing "te" to write "test" for the repository name, I noticed the wiki page was changed to edit mode when I didn't intend to. I noticed a similar behavior when searching in the "Keyboard shortcuts" search bar for "edit." After typing only the first letter "e," I saw the wiki page changed to edit mode.
It's even worse if the search term contains "i" because then it tries to create a new issue when typing "edit" quickly.
I tried checking other parts of the project, like the source code, and couldn't reproduce the behavior. So far, it seems that it only happens on a wiki page.
Steps to reproduce
For "Search or go to" and change to Edit mode:
- Go to Plan > Wiki.
- Make sure you are in the Wiki's home.
- Click on the left sidebar "Search or go to".
- Start typing to search for "test".
- Notice how after typing "e", the page changed to edit mode.
For "Keyboard shortcuts" and change to Edit mode:
- Go to Plan > Wiki.
- Make sure you are in the Wiki's home.
- Press "Shift + ?" to open the keyboard shortcuts help.
- Click on the keyboard shortcuts search bar.
- Type "e".
For "Search or go to" and jumping to "New Issue":
- Go to Plan > Wiki.
- Make sure you are in the Wiki's home.
- Click on the left sidebar "Search or go to".
- Type quickly "edit".
- Notice how after typing quickly up to the "i", the page jumped to "New Issue".
What is the current bug behavior?
It triggers shortcuts actions into the wiki page when they are not intended, and the intended action was to search in a search bar.
What is the expected correct behavior?
That I can search in any search bar modal without triggering shortcuts on the wiki page behind it.
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
This is the output of https://gitlab.com/help:
GitLab Enterprise Edition 17.1.0-pre 406a7e9a9d5
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)(we will only investigate if the tests are passing)