Skip to content

Copy/paste events #235

@tpoisseau

Description

@tpoisseau

#231 (comment)

How should we plan to implement copy/paste events.

On this PR I had to add some code in Java side, but the result was a bit hacky but use the clipboard events.

  • skip ctrl+c/ctrl+v events
  • a non-aware environment could trigger two same events (one from keyboard, another from clipboard events)

This implementation, which straddled the line between java and js, was unsatisfactory in my eyes.


I think we should on https://github.com/Actelion/openchemlib define a generic API for clipboard, compatible with browser clipboard API and DataTransfer API.
It will be hard work, it will need to support async pattern (with callback, I think it will be the most simple we could do to be compatible with java and js)

With a generic clipboard api and clipboard events handling in java. The actual IClipboardHandler would need to change, but could have a single implementation in java, using an IClipboard.


Or an other solution could be to do full implementation of copy-paste events handling in JS side for this repository, and do not propagate copy-paste events from keyboard to java.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions