Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-21973

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Solved By
    • Major
    • None
    • 15.10.6, 16.1.0
    • CKEditor, Mentions
    • Jetty / HSQL or Debian Tomcat9/MariaDB' Browser: Firefox 123.0 (64-bit) / Linux mint or Chromium Version 121.0.6167.160 (Official Build) for Linux Mint (64-bit)
    • Unknown
    • N/A
    • N/A

    Description

      Reproduction Steps

      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

      Scenario 2

      1. edit an empty page
      2. insert an info box macro
      3. empty the content of the info box, then insert an icon macro

      Expected

      • the mention/icon macro is inserted

      h2 Actual

      • the mention/icon is removed

      Inserting the macro in a new, empty line is important for the issue 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.

      Attachments

        Issue Links

          Activity

            People

              mleduc Manuel Leduc
              camil7 Clemens Robbenhaar
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: