Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-32387

sites containing iframes jump back to top after site finished loading

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: RESOLVED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 11.2, 11.3, 12.0
    • Fix Version/s: 12.0
    • Component/s: User Experience
    • Labels:
      None
    • Test Plan:
      Hide

      1. visit site containing iframes
      2. scroll before site is finished loading
      3. wait for load finish
      4. Did the site jump back to top?

      Show
      1. visit site containing iframes 2. scroll before site is finished loading 3. wait for load finish 4. Did the site jump back to top?

      Description

      Noticed behavior: on some sites, when the user scrolls but the site finishes loading after it was scrolled, the site jumps back to the top - sometimes even multiple times but most definitely on load finish. Needlessly to say that this is very annoying.

      Most sites don't use iframes anymore but some of our own site layouts (ie "home / overview" sites or sites containing multiple tools in general) do still use iframes to layout multiple tools.
      The offender seems to be headscripts.js:

      ...
      if (frame)
      {
      	// reset the scroll
      	parent.window.scrollTo(0,0);
      ...
      

      This explains why some sites jump multiple times.

      Though the original intention of this scroll reset is unclear.
      Uncommenting this line removes this unwanted behavior and doesn't seem to have any side effects so far.

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                Unassigned Unassigned
                Reporter:
                stendler Maximilian Stendler
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration