Cut, Copy, Paste. Anyone not living under a rock for the past 30 years knows what these are and probably uses them every day. First made popular in the 80s by Apple’s Macintosh and Lisa computers, these surprisingly simple operations have influenced the way we use computers for generations.
But I’m English and I feel like a bit of a moan…
Use Case 1: Copy from Trello to WordPress
I work with a lot of articles that get translated for Dragon Burn. We use Trello to coordinate things and translations are attached to Trello cards as Word documents.
First I go to a Trello Card with a Word document attached:
I click to open the document and select some text to copy:
Press Ctrl+C, go back to my WordPress article, press Ctrl+V:
What’s even weirder about this is that if I right-click and select “copy”, the text pastes as expected. Weirder than that, after I do this, Ctrl+C – Ctrl+V now works as expected as well.
Use Case 2: Copy from Word to WordPress Captions
If I download the Word documents and copy/paste from Word to WordPress it all seems to work fine. That is until I paste into an image caption:
Obviously it’s pasting with formatting and WordPress image captions don’t handle this properly. If we paste without formatting (Ctrl+Shift+V) then it works as expected.
How can we not be getting this right after nearly 40 years? Surely by now we shouldn’t have these weird inconsistencies.
I’m not sure what causes the Trello behavior, but if I was to guess it’s probably because the link that opens the document is still selected when I first press Ctrl+C. Right clicking seems to deselect the link, allowing for normal copy/paste. I don’t know for sure if this is the reason, and it doesn’t happen for PDF documents so there’s even more weirdness to add to that bug.
The image captions in WordPress probably haven’t been implemented to handle pasting formatted text. Since the captions have formatting applied automatically it was probably decided that it didn’t need to handle formatting, so the caption textbox doesn’t strip out formatting tags like the other widgets do.
I think the lesson to take from this is that there will always be weird bugs and corner cases developers don’t notice that lead to inconsistent behaviour. And no matter how long a feature has existed, even the simplest ones will still have these bugs and inconsistencies.