This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-c67ddbe6-79c1-446e-bc7e-1721fbc7f154 XWIKI-22210 Open

Blocks of {code} are acting strange

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-ee48a898-e03a-4fcd-a6ae-d54efdac3731 Ion Claudiu created this issue on 04/Jun/24 10:22
 
Summary: Blocks of {code} are acting strange
Issue Type: cid:jira-generated-image-avatar-c67ddbe6-79c1-446e-bc7e-1721fbc7f154 Bug
Affects Versions: 16.1.0
Assignee: Unassigned
Components: Rendering - Code Macro
Created: 04/Jun/24 10:22
Environment: Firefox 126.0.1, XWiki 16.0.1
Priority: cid:jira-generated-image-static-major-d8f783fd-e7b8-488c-b800-ef050a61044f Major
Reporter: Ion Claudiu
Description:

Having a block of {code} in a page makes editing act weird.

This bug was reported by a client in these two tickets:  ticket 1 and ticket 2 

I managed to reproduce them by following the following steps (similar to the ones that the client described):
1) write text that has {code} in it
2.1) if there is a space between the text and the block of code, the editing works as long as you don't write next to the block of code
2.2) if there is no space between the text and the block of code, adding a space will also add a new line
3) pressing Delete will delete the entire block of code, pressing Backspace will act as expected (delete the character on the left of the cursor). This is why I think the issue is related to the block of code being inserted in the page as a layout.
4) it is impossible to place the cursor before the block of code

The bug is not present while editing in source mode so this may be a workaround.