Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy/paste events #235

Open
tpoisseau opened this issue Oct 15, 2024 · 0 comments
Open

Copy/paste events #235

tpoisseau opened this issue Oct 15, 2024 · 0 comments

Comments

@tpoisseau
Copy link
Contributor

#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant