Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-75762

Boost in Moodle 4 always scroll to top when returning to course page after visiting an activity or resource

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.0 regressions, 4.0.4, 4.0.5, 4.0.6, 4.1, 4.1.1
    • None
    • Accessibility, Themes
    • MOODLE_400_STABLE, MOODLE_401_STABLE

    Description

      It's a change that has been noticed by our teachers in Moodle and annoys them when building their courses.

      To reproduce:

      • Create a course
      • Add an activity or a resource to a section that need scroll to arrive to them
      • Visit the activity or the resource just added
      • Click the browser's back button

      Alternate reproduction

      • Visit a forum post
      • Click the "Permalink" link for one of the posts down the page and copy the URL
      • Paste it into a private browsing tab
        • Confirm that you're scrolled to the correct post
      • Press the browser button
        • Expected: you're scrolled to the correct post
        • Actual: You're at the top of the page

      Observed behaviour

      *the page scrolls to top*

      Expectation (and the case prior to Moodle 4.0)

      *the page stays at the same scroll position*

       
      This is happening because we now scroll the <div id="page"> instead of the <html> node like we did in 3.11 and earlier.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jsegarra Juan Segarra Montesinos
              Huong Nguyen, Bas Brands, Mathew May
              Votes:
              41 Vote for this issue
              Watchers:
              17 Start watching this issue

              Dates

                Created:
                Updated: