Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-29197 Content displacement when using clicking incontent anchor elements
  3. MDL-30533

Content displacement when using clicking incontent anchor elements: Take 2

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.0, 2.1, 2.2
    • Fix Version/s: 2.0.6, 2.1.3
    • Component/s: Themes
    • Labels:
    • Testing Instructions:
      Hide

      1. FIRST with editing ON create an anchor (bookmark) using the HTML part of the text editor at about Section 5 of a course page (i.e) <a name="test"></a> SAVE
      2. In Section 0 (zero) of the same course page create a link back to the anchor (i.e) <a href="#test">anchorlink</a>
      3. Turn Editing OFF
      4. CLICK on the link: the page will then scroll down to the section which was bookmarked.
      5. SCROLL back up to the top of the page -> check to see headline h2.headingblock is fully visible

      Show
      1. FIRST with editing ON create an anchor (bookmark) using the HTML part of the text editor at about Section 5 of a course page (i.e) <a name="test"></a> SAVE 2. In Section 0 (zero) of the same course page create a link back to the anchor (i.e) <a href="#test">anchorlink</a> 3. Turn Editing OFF 4. CLICK on the link: the page will then scroll down to the section which was bookmarked. 5. SCROLL back up to the top of the page -> check to see headline h2.headingblock is fully visible
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      The fix for MDL-29197 which addressed this same problem, was fixed a few weeks ago, however as mentioned at the time it was not the best solution, as I have since found out. Themes like Sky High, which exclude pagelayout.css where the patch was applied, it appears the problem still persists.

      Fortunately, a fix for this has been put forward by John Stabinger, which adds to .clearfix:after css, which is already present in Base theme. John's solutions is as follows...

      .clearfix:before,
      .clearfix:after { content: "."; display: block; height: 0; overflow: hidden; } 
      .clearfix:after { clear: both;} 
      .clearfix {zoom: 1;}

      Works great! So thanks for that John

      Cheers
      Mary

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                28/Nov/11