• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Design issue  Inserted code is deleted when composing rest of post

Brogan

XenForo moderator
Staff member
#1
This happens in Chrome, not sure about other browsers.

Start a new thread as normal and click on the Code button to insert the code as follows:
post1.png

Then click in the editor window to continue composing the post and the next key press, e.g. Enter, results in this:
post2.png


A CTRL+Z brings the text back and then the next key press moves the focus to the top of the editor window so the cursor has to be placed back at the end of the inserted code to continue writing the post.

This happens pretty much every time.
 

Kier

XenForo Developer
Staff member
#3
Nor me. It seems to be working without a problem on Chrome for Mac. I'll dig out a Windows version to see what happens. What version are you using?
 

Brogan

XenForo moderator
Staff member
#5
Same version as above - 8.0.552.215.
If I get the chance I'll make a video.

I suspect it's all related to Chrome though and the interaction with TinyMCE.
 

Mike

XenForo developer
Staff member
#9
I've finally managed to reproduce this, and the underlying issue is a nightmare. It relates to nested <p> tags that the browsers are creating when we insert the code. I can't see how it can be reasonably worked around at this point, unfortunately.