Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-100547

While editing a large page (scrollable both bottom and right), cursor jumps to the top when clicking far to the right of the existing text at the bottom

XMLWordPrintable

      The fix for this bug will be backported to our current Long Term Support releases if it passes our risk assessment.

      We recognise the impact of this bug and plan to backport the fix to our Long Term Support releases. Once the exact fix version is known we will update this ticket. Not all code changes are suitable to be backported and this may still be rejected during our review process.

      Issue Summary

      While editing a large page (scrollable both bottom and right), cursor jumps to the top when clicking far to the right of the existing text at the bottom

      Steps to Reproduce

      1. Install Confluence for any of the impacted versions
      2. Edit an existing long page one (or create a new one)
      3. The page should be long and scrollable both bottom and right
      4. Scroll to the bottom of the page and to the right
      5. Now click, or press enter, or any other key
      6. Page Jumps to the top

      Expected Results

      User should see the cursor blinking to add new data

      Actual Results

      Page Jumps to the top

      Workaround

      Note

      We recommend testing these changes in staging prior to deploying them in production. This change, whilst simple, is targeting a complex part of the editor, and may lead to unexpected results. While we have tested thoroughly in our testing environments, we are unable to test all possible configurations of data, Apps and configuration.

      Should the change introduce issues, please undo the below steps, and let us know on this ticket.

      1. On the Confluence General Administration screen, navigate to the Custom HTML page
      2. On the Custom HTML screen, click Edit and enter the below in the At beginning of the BODY section
        Workaround Code
        <script>
            try {
        
                require('confluence/api/event').bind('rte-ready', () => { 
                    const iframe = document.getElementById('wysiwygTextarea_ifr');
                    const contentDoc = iframe?.contentDocument;
                    if (contentDoc?.body?.style) {
                        contentDoc.body.style.height = 'auto';
                    }
                })
            } catch (e) {
                console.error('Editor height patching error', e);
            }
        </script>
        
      3. Click Save

      Versions Tested

      Please confirm all versions that have been tested for this issue, and indicate whether the tested version is affected or not affected, below: 

      Testing Requirements Version Affected Version
      Customers Reported Version 9.2.2 yes
      Most Recent Bug-Fix Release 10.0.2 yes
      Previous Major Release  7.19, 8.5 Yes 
      Most Recent LTS 9.2.7 yes
      Previous Supported LTS    
      Other Versions..    
      (Add rows as needed)    

              mleizerovich Maxim Leizerovich
              d51fc966722f Shivangi Nayak
              Votes:
              49 Vote for this issue
              Watchers:
              76 Start watching this issue

                Created:
                Updated:
                Resolved: