jspreadsheet / jspreadsheet/ce

onbeforepaste not firing when dragging cells to copy-paste (selectionCopy: true)

Open
#1,735 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
JavaScript
Stars
7.2k
Forks
890
PR merge metrics
No merged PRs in 30d

Description

I want to prevent data mixing when users drag cells to copy and paste, so I need to restrict horizontal "dragging and copy-pasting".

I found some examples suggesting that this can be achieved using onbeforepaste, but it's not being triggered. You can see this issue in the following example.

Does anyone know if this is the correct way to achieve it, or are there better alternatives?

Thanks.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CodePen example and trace the selectionCopy drag-and-copy path alongside the onbeforepaste entry point. Confirm whether the callback is skipped during dragging, then define and test the expected restriction for horizontal copy-pasting without mixing data.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.