WYSIWYG - Cannot paste text at cursor position

Permalink
Yesterday I came across an odd bug that I had never noticed before.

In any WYSIWYG editor that is not inline, any pasted text is inserted before the existing content, regardless of the cursor position.

To recreate the error:

1. Add/Edit any block with a WYSIWYG editor that is not inline.
2. Add some content if to the WYSIWYG editor if there isn't some already.
3. Set the cursor position anywhere other than the beginning of the content.
4. Copy (cmd+c) some text from any external source.
5. Attempt to Paste (cmd+v) the text at the cursor position.

The cursor disappears and the pasted text is inserted before the existing content (see attached example).

To eliminate any potential conflicts, I did a clean install of concrete5 5.7.5.9 with no custom packages, themes or add-ons and the problem persists.

The JavaScript Console in Mac Chrome/53.0.2785.116 displays the following error when attempting to paste the text at the cursor position:

VM85:5 The given range isn't in document.
addRange @ VM85:5


I reported it as a bug here:

https://www.concrete5.org/developers/bugs/5-7-5-9/wysiwyg-cannot-pas...

2 Attachments

shoutmediaca
 
ob7dev replied on at Permalink Reply
ob7dev
I experienced this before as well. I've gotten into the habbit of switching to code mode and pasting it there then switching back.
shoutmediaca replied on at Permalink Reply
shoutmediaca
That's fine for those of us that are comfortable working in code view. I'm thinking of the non-technical users that are intimidated by angle brackets. They won't be very pleased with this workaround.
ob7dev replied on at Permalink Reply
ob7dev
Open an issue on github, but first make sure it hasn't already been addressed in v8.
Gondwana replied on at Permalink Reply
Gondwana
Since the Content block is switching from Redactor to CK in c5 8, I'd expect its behaviour to be quite different.

I think CK might be usable in c5.7 sites too, somehow.

Certainly the flaky behaviour of Redactor makes me nervous when handing over sites.