-
Notifications
You must be signed in to change notification settings - Fork 25
Description
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+vevents - 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.