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

Macro: quick double paste operation from clipboard leads to invalid entities on canvas #4479

Closed
AlexeyGirin opened this issue Apr 17, 2024 · 3 comments · Fixed by #4629
Closed
Assignees
Labels
Macromolecules Priority: Medium Sequence mode Bucket: Sequence mode related issues

Comments

@AlexeyGirin
Copy link
Collaborator

AlexeyGirin commented Apr 17, 2024

When user pastes structure to canvas twice with a short interval, this may lead to "broken" canvas with invalid entities (cannot be remove, survive canvas clearing, etc.). The problem easier reproduces on big inserted structures -- assumingley when you try to paste new structure before pasting of previous one is completed.

Steps to Reproduce

  1. Switch to Macro - Sequence mode - Peptide type
  2. Copy to clipboard big enough testx, e.g. the following one: ACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWYACDEFGHIKLMNPQRSTVWY
  3. Start new sequence (via context menu)
  4. Paste text from clipboard on the canvas twice but fast (hold Ctrl key and press V key twice very fast).

Actual behavior
System put second sequence as phantom object that is not possible to delete even by clearing the canvas
image

Expected behavior
System doesn't allow to past from clipboard while previous operation is not finished
image

Versions:
Windows 10
Chrome Version Version 123.0.6312.106 (Official Build) (64-bit)
Ketcher Version 2.21.0-rc.1 Build at 2024-04-15; 20:00:15
Indigo Toolkit Version 1.20.0-rc.1.0-g8e8ffc3c3-wasm32-wasm-clang-12.0.0

Issue found while testing #3894

@AlexeyGirin AlexeyGirin added this to the Ketcher 2.21.0-rc.2 milestone Apr 17, 2024
@AlexeyGirin AlexeyGirin changed the title Macro: Async paste from clipboard causes canvas collapse Macro: Async paste operation from clipboard causes canvas collapse Apr 17, 2024
@Zhirnoff Zhirnoff changed the title Macro: Async paste operation from clipboard causes canvas collapse Macro: Paste operation from clipboard causes canvas collapse Apr 22, 2024
@vanoprenko vanoprenko changed the title Macro: Paste operation from clipboard causes canvas collapse Macro: quick double paste operation from clipboard leads to invalid entities on canvas Apr 22, 2024
@Zhirnoff
Copy link
Collaborator

The issue has been moved from 2.21.0-rc.2 to 2.22.0-rc.1 after discussion with management and in accordance with the testing flow process.

@AlexeyGirin AlexeyGirin added the Sequence mode Bucket: Sequence mode related issues label Apr 25, 2024
@ilya-asiyuk-epam ilya-asiyuk-epam self-assigned this May 15, 2024
@ilya-asiyuk-epam
Copy link
Contributor

Check 'applyAdditionalPasteOperations' function

ilya-asiyuk-epam added a commit that referenced this issue May 16, 2024
ilya-asiyuk-epam added a commit that referenced this issue May 16, 2024
…ation-from-clipboard-leads-to-invalid-entities-on-canvas

#4479 - Macro: quick double paste operation from clipboard leads to invalid entities on canvas
@AlexeyGirin
Copy link
Collaborator Author

Verified.

  • Indigo Toolkit Version 1.21.0-dev.3.0-g6f55c664-wasm32-wasm-clang-12.0.0
  • Ketcher Version 2.21.0-rc.2 Build at 2024-05-20; 05:30:45
  • Chrome Version 124.0.6367.201 (Official Build) (64-bit)
  • Windows 10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Macromolecules Priority: Medium Sequence mode Bucket: Sequence mode related issues
Projects
None yet
3 participants