hoppscotch icon indicating copy to clipboard operation
hoppscotch copied to clipboard

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

Open anwarulislam opened this issue 1 year ago • 0 comments

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

anwarulislam avatar Mar 05 '25 11:03 anwarulislam