Copy from context menu and Ctrl + V doesn't work

Posted by: kim.dok on 26 January 2023, 9:58 am EST

    • Post Options:
    • Link

    Posted 26 January 2023, 9:58 am EST

    Hi, when we are trying to copy a cell from right click (context menu) and then paste it with Ctrl + V, the value is not pasted, (if we had a value that we copied to clipboard via Ctrl + C it will be pasted instead).

    We want to enable synchronization between copy, paste from right click context menu and Ctrl + C, Ctrl + V.

    Can we have some guidance on how to achieve the required outcome?

    Thanks.

  • Posted 27 January 2023, 7:32 am EST

    Hi Kim,

    The clipboards used when copying a range from the context menu and when using Ctrl + C are different.

    Because web apps cannot access the global clipboard, when you copy using the context menu, it uses the internal clipboard whereas when you copy using Ctrl + C, it uses the global clipboard. This explains why you are seeing different results.

    Additionally, keep in mind that Excel has access to the system clipboard, which is why it might function there.

    When the spread’s context menu is used to copy something, the value is saved in the internal clipboard of the spread rather than the system clipboard, and when the keyboard shortcut ctrl+v is used to paste something, the value from the system clipboard is preferred over the internal clipboard.

    The preference for the value of the external(global) clipboard is intentional and by design. However, due to browser restrictions, SpreadJS is unable to access the system clipboard. As a result, internal copy from the context menu does not alter the contents of the system clipboard, which is why pressing Ctrl+V after copying from the context menu still pastes previously copied values from the system’s clipboard.

    You might also modify the paste command to include your own unique activities. You can consult the forum case below, which addresses a similar case: https://www.grapecity.com/forums/spreadjs/programatically-trigger-paste-event-ctrl-v

    I hope this clarifies your issue. Please let us know if you face any further issues. We would be happy to help you.

    Regards,

    Ankit

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels