Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-78209

Unexpected removal of newline character when cutting and pasting text in Code Snippet element.

    XMLWordPrintable

Details

    Description

      Issue Summary

      When users cut and paste text within the Code Snippet, the newline character is unexpectedly removed. This results in concatenated lines where there should be distinct lines. 

      Steps to Reproduce

      1. Create a Confluence Cloud Page and go to edit mode.
      2. Insert a Code Snippet element.
      3. Type in line 1 "abc", in line 2 "def", and in line 3 "ghi".
      4. Move the cursor to the end of line 2, behind the "f".
      5. Press Shift and Left Arrow 4 times to select "def" and the hidden newline character.
      6. Press Ctrl+X to cut the selection. The resulting text should be "line 1 abc, line 2 ghi".
      7. Insert the cut-out part after "abc".
      8. The newline character is unexpectedly removed, resulting in "line 1 abcdef line 2 ghi".

      Expected Results

      After cutting and pasting the text in step 7, the newline character should be retained, resulting in "line 1 abc def line 2 ghi".

      Actual Results

      After cutting and pasting the text in step 7, the newline character is not retained

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              9219e3807eac Nitika Arora
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: