Prevent Clipboard reset

Posted by: adisa.craig on 27 November 2024, 4:10 pm EST

    • Post Options:
    • Link

    Posted 27 November 2024, 4:10 pm EST

    Is there a way to prevent the clipboard from resetting for certain actions? I tried cancelling the event when a

    GC.Spread.Sheets.ClipboardActionType.reset
    action occurred but it still removed the content from the clipboard

    What I am trying to achieve is a sync of the keyboard shortcut copy/paste to the spread context menu copy/paste.

    If i copy a row/column via the context menu and then do an Insert row/col action I am only able to paste via the keyboard shortcut as the context menu paste does not work.

  • Posted 28 November 2024, 4:48 am EST

    Hi,

    SpreadJS uses both the external clipboard (system clipboard) and an internal clipboard. When you use keyboard shortcuts like Ctrl+C or Ctrl+V, you are interacting with the system clipboard. However, due to browser security restrictions, direct programmatic interaction with the system clipboard is limited. This means you can only use the system clipboard through actions like Ctrl+C or Ctrl+V. Conversely, the context menu’s copy-paste functionality operates with the internal clipboard.

    To address your concern, the internal clipboard resets by design. For instance, copying a row or column and then inserting a row or column will reset the internal clipboard. This behavior mirrors Excel, where actions like copying a row/column using the context menu and then editing any cell value clear the system clipboard.

    Regarding “What I am trying to achieve is a sync of the keyboard shortcut copy/paste to the spread context menu copy/paste,” this is currently not achievable due to the aforementioned browser limitations on system clipboard access.

    Regards,

    Priyam

Need extra support?

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

Learn More

Forum Channels