There are 2 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-588b949b-a08a-41cd-a309-ba478903eb76 XWIKI-21973 Open

Inline macro are removed when inserted in empty lines of a macro

 
View issue   ยท   Add comment
 

2 updates

 
cid:jira-generated-image-avatar-c7292b2f-d316-46c5-87bc-976dc76d79c2 Changes by Manuel Leduc on 12/Dec/24 16:24
 
Summary: User Mention inside Inline macro content is are removed when inserted in empty lines of a macro
Description: h2. Reproduction Steps to reproduce:
h3. Scenario 1
* go to the sandbox start page (or any other page containing e.g. an "info" macro
* press 'e' to edit - the inplace editor appears
* click into the "info" macro and press "Enter" to add a new line
* in the new line, press '@' to create user mention, and select a user

h3. Scenario 2
# edit an empty page
# insert an info box macro
# empty the content of the info box, then insert an icon macro


h2.
Expected behavior:
* the mention
for the user gets /icon macro is inserted

Observed behavior: h2 Actual
*
for a short time a {{Macro: the mention }} /icon is displayed, then it gets removed . No user mention is inserted.

Inserting the
mention macro in a new, empty line seems to be is important for the issue the to be reproducible. Doing the same on a non-empty line (even by typing in a simple space) prevents the behavior.

It is not relevant if the in-place editor is used or a dedicated edit mode. It is also reproducible when editing e.g.
, blog posts, also in the object editor.

What seems to be important is that the mention is inserted inside a macro; e.g.
, inserting the '@' inside a "info box" as selected from the "Styles" menu does not trigger the issue, as that option only creates a {{div}} with a {{{}class="box infomessage"{}}}, and no macro.