[PR #4826] [MERGED] fix(common): correct coordinates calculation for selection end position #4955

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

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4826
Author: @anwarulislam
Created: 3/5/2025
Status: Merged
Merged: 3/13/2025
Merged by: @jamesgeorge007

Base: nextHead: fix/selection-context-menu-position


📝 Commits (1)

  • a3a7d17 fix(common): correct coordinates calculation for selection end position

📊 Changes

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

View changed files

📝 packages/hoppscotch-common/src/composables/codemirror.ts (+1 -1)

📄 Description

Closes HFE-770

This pull request addresses a bug where the selection of text in the JSON input field does not follow the mouse cursor properly when scrolling. Users may find it difficult to find context menu because of this.

What's Changed

In the file packages/hoppscotch-common/src/composables/codemirror.ts, we made an update to the handleTextSelection method. The change involves using the 'to' position (end position) instead of the 'from' position to correctly position the context menu at the location where the drag operation ended. This adjustment ensures that the context menu appears at the appropriate spot.

  • Not Completed
  • Completed

🔄 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/4826 **Author:** [@anwarulislam](https://github.com/anwarulislam) **Created:** 3/5/2025 **Status:** ✅ Merged **Merged:** 3/13/2025 **Merged by:** [@jamesgeorge007](https://github.com/jamesgeorge007) **Base:** `next` ← **Head:** `fix/selection-context-menu-position` --- ### 📝 Commits (1) - [`a3a7d17`](https://github.com/hoppscotch/hoppscotch/commit/a3a7d1738eed1712426d0aeac49b588e771604ed) fix(common): correct coordinates calculation for selection end position ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/src/composables/codemirror.ts` (+1 -1) </details> ### 📄 Description Closes HFE-770 This pull request addresses a bug where the selection of text in the JSON input field does not follow the mouse cursor properly when scrolling. Users may find it difficult to find context menu because of this. ### What's Changed In the file `packages/hoppscotch-common/src/composables/codemirror.ts`, we made an update to the `handleTextSelection` method. The change involves using the 'to' position (end position) instead of the 'from' position to correctly position the context menu at the location where the drag operation ended. This adjustment ensures that the context menu appears at the appropriate spot. - [ ] Not Completed - [x] Completed --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:26:45 +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#4955
No description provided.