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

API AP.navigator.getLocation returns wrong contentId

XMLWordPrintable

      Issue Summary

      The wrong contentId is returned from AP.navigator.getLocation

      This is reproducible on Data Center: (yes) / (no)

      Steps to Reproduce

      1. Create a Space X with Homepage "A” containing a macro with the following code:
      <div id="ui-container">
          <h1>AP.navigator.getLocation:</h1>
          <div class="container">
          </div>
      </div>
      <script>
          AP.navigator.getLocation((location) => {
              document.querySelector('.container').innerHTML = JSON.stringify(location);
          })
      </script>
      
      1. Create a Page “B” (a regular page)
      2. From homepage “A” containing the macro, navigate to “B”
      3. Refresh the browser when page page "B” is loaded.
      4. Using the navigation to go to the Homepage A

      Expected Results

      • The function AP.navigator.getLocation should return the contentId the ID of the Homepage A.

      Actual Results

      • The function AP.navigator.getLocation returns as contentId the ID of Page B instead of the Homepage A.

      Workaround

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

              Unassigned Unassigned
              71f1dad54ffe Wagner M.
              Votes:
              9 Vote for this issue
              Watchers:
              12 Start watching this issue

                Created:
                Updated: