Description
Issue initially reported (here) by @dpasque, but had to refile as the report was transferred to a private repo and couldn't be moved back to a public one.
Quick summary
If you have two spoiler blocks back to back, select them both and copy in a published P2 post, and then try to paste elsewhere in a P2 editor, your webpage with freeze up with an unresponsive script! There seems to be some kind of infinite loop or hang on the main thread.
Steps to reproduce
- Write a P2 post
- Write two spoiler blocks back to back. Put a header and some content in each.
- Post the post.
- Highlight the two spoiler blocks while collapsed.
- cmd+c to copy
- In an editor somewhere (like a comment on that very post), try to cmd+p paste.
What you expected to happen
The blocks to paste.
What actually happened
The main thread locks up!
Context
The very P2 post I found this (has good data to reproduce): pciE2j-QC-p2
Simple, Atomic or both?
Simple, Atomic
Theme-specific issue?
It's O2 blocks, so specific to P2!
The spoiler block is in the Calypso repo:
https://github.com/Automattic/wp-calypso/tree/1089ff50ac29fde828fbcbfc90e40101cd1e343d/apps/o2-blocks/src
Browser, operating system and other notes
Chrome
Reproducibility
Consistent
Severity
Some (< 50%)
Available workarounds?
Yes, easy to implement
Workaround details
You can just copy one at a time!