[PR #5794] [MERGED] fix(common): ignore shift keybindings in CodeMirror editors #5354

Closed
opened 2026-03-17 02:48:31 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/5794
Author: @Leon-Luu
Created: 1/21/2026
Status: Merged
Merged: 1/23/2026
Merged by: @jamesgeorge007

Base: nextHead: fix/keybinding_ignore_on_codemirror


📝 Commits (2)

  • dcb5cd6 fix: keybinding ignore on codemirror editor
  • 435afca Merge branch 'main' into fix/keybinding_ignore_on_codemirror

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 packages/hoppscotch-common/src/helpers/keybindings.ts (+2 -2)

📄 Description

Issue: Typing "/" in the pre-request or post-request script editor was opening the Support menu (GitHub issue #5777)

Root Cause: The [shift-/] keybinding (which opens the support modal) was being triggered even when typing in a CodeMirror editor. The keybinding handler only checked for regular input elements but not for CodeMirror editors.

Solution: Updated the keybinding handler in keybindings.ts to ignore [shift]+ any key combinations when typing in a CodeMirror editor, just like it does for regular input elements.

image

Closes #
https://github.com/hoppscotch/hoppscotch/issues/5777

What's changed

Notes to reviewers


Summary by cubic

Stop the Support modal from opening when typing in CodeMirror-based script editors. We now ignore Shift-modified shortcuts (e.g., Shift+/) while the editor is focused.

Written for commit 435afca4fa. Summary will update on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/5794 **Author:** [@Leon-Luu](https://github.com/Leon-Luu) **Created:** 1/21/2026 **Status:** ✅ Merged **Merged:** 1/23/2026 **Merged by:** [@jamesgeorge007](https://github.com/jamesgeorge007) **Base:** `next` ← **Head:** `fix/keybinding_ignore_on_codemirror` --- ### 📝 Commits (2) - [`dcb5cd6`](https://github.com/hoppscotch/hoppscotch/commit/dcb5cd69b6a71e8b4eb0a4b5977a449ca985a346) fix: keybinding ignore on codemirror editor - [`435afca`](https://github.com/hoppscotch/hoppscotch/commit/435afca4fa0b077cddeb0069a1e5949c690a9c3c) Merge branch 'main' into fix/keybinding_ignore_on_codemirror ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/src/helpers/keybindings.ts` (+2 -2) </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (docs, feature, etc.) and keep it as small as possible. You can open multiple prs instead of opening a huge one. --> **Issue:** Typing "/" in the pre-request or post-request script editor was opening the Support menu (GitHub issue #5777) **Root Cause:** The [shift-/] keybinding (which opens the support modal) was being triggered even when typing in a CodeMirror editor. The keybinding handler only checked for regular input elements but not for CodeMirror editors. **Solution**: Updated the keybinding handler in keybindings.ts to ignore [shift]+ any key combinations when typing in a CodeMirror editor, just like it does for regular input elements. <img width="746" height="314" alt="image" src="https://github.com/user-attachments/assets/9976c7d5-e6a8-45e4-8e38-b1e48e0493ff" /> <!-- If this pull request closes an issue, please mention the issue number below --> Closes # <!-- Issue # here --> https://github.com/hoppscotch/hoppscotch/issues/5777 <!-- Add an introduction into what this PR tries to solve in a couple of sentences --> ### What's changed <!-- Describe point by point the different things you have changed in this PR --> <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> ### Notes to reviewers <!-- Any information you feel the reviewer should know about when reviewing your PR --> <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Stop the Support modal from opening when typing in CodeMirror-based script editors. We now ignore Shift-modified shortcuts (e.g., Shift+/) while the editor is focused. <sup>Written for commit 435afca4fa0b077cddeb0069a1e5949c690a9c3c. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:48:31 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#5354
No description provided.