Moodle
  1. Moodle
  2. MDL-9942

htmlAREA - uses the innerHTML property to delete child nodes from a parent.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.8.1
    • Component/s: Libraries
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE
    • Rank:
      24527

      Description

      On line 1165 of htmlArea.php, htmlarea uses the innerHTML property to remove all the child nodes from the status bar. This can cause a run time error in Internet Explorer 7 in some contexts.

      Will commit the following fix to HEAD shortly -

      1165 this._statusBarTree.innerHTML = HTMLArea.I18N.msg["Path"] + ": ";

      replaced by
      while(this._statusBarTree.childNodes.length>0)

      { this._statusBarTree.removeChild(this._statusBarTree.childNodes[0]); }

      this._statusBarTree.appendChild(document.createTextNode(HTMLArea.I18N.msg["Path"] + ": "));

        Activity

        Hide
        aforth added a comment -

        Line number is now 1143 not 1165

        Show
        aforth added a comment - Line number is now 1143 not 1165
        Hide
        Martin Dougiamas added a comment -

        Thanks, Anthony.

        Petr can you just do a quick check to make sure this doesn't break anything else and check in?

        Show
        Martin Dougiamas added a comment - Thanks, Anthony. Petr can you just do a quick check to make sure this doesn't break anything else and check in?
        Hide
        aforth added a comment -

        Found a further instance of this bug on line 877. Have committed a fix to head.

        Show
        aforth added a comment - Found a further instance of this bug on line 877. Have committed a fix to head.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: