mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #5224] [MERGED] fix: avoid shortcut conflicts in CodeMirror editors #5115
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5115
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/5224
Author: @SharadSaha
Created: 7/6/2025
Status: ✅ Merged
Merged: 7/10/2025
Merged by: @jamesgeorge007
Base:
patch← Head:block-alt-up-down-in-editor📝 Commits (3)
bd27a27Restricted alt+up and alt+down default key bindings' behaviour inside editors80f4db7changed helper function name and added JSDoc for isCodeMirrorEditor4a8177cadded unit tests for dom.spec.js📊 Changes
3 files changed (+97 additions, -1 deletions)
View changed files
📝
packages/hoppscotch-common/src/helpers/keybindings.ts(+10 -1)➕
packages/hoppscotch-common/src/helpers/utils/__tests__/dom.spec.js(+77 -0)📝
packages/hoppscotch-common/src/helpers/utils/dom.ts(+10 -0)📄 Description
Closes #4678
What's changed
Prevents
alt+upandalt+downfrom changing the request method when focus is inside a typable element or the CodeMirror editor.Why?
These shortcuts conflict with native CodeMirror actions like moving lines.
Notes to reviewers
Skips these keybindings in
generateKeybindingString()when the event target is an.cm-editorinput i.e CodeMirror editor.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.