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

javascript defer attribute causes error in IE

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5.3, 1.9.1
    • Fix Version/s: 1.8.7, 1.9.3
    • Component/s: General
    • Labels:
      None
    • Environment:
      Windows XP
    • Affected Branches:
      MOODLE_15_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      in lib/javascript.php:

      <script language="JavaScript" type="text/javascript" defer="defer">

      The "defer" causes Internet Explorer to defer processing of the openpopup() {} function definition to after the page has finished loading. This causes an error on pages where openpopup() is called before the page has finished loading, eg. when loading the messages popup window after logging in.

      This can be fixed by changing the line to:

      <script language="JavaScript" type="text/javascript">

      The problem does not effect Firefox.

        Attachments

        1. patch-4346-defer.txt
          0.8 kB
          Mathieu Petit-Clair

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  15/Oct/08