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

SCORM won't open in new window for IE7 and IE8 in compatibility mode

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.3.3
    • 2.3
    • SCORM
    • MOODLE_23_STABLE
    • MOODLE_23_STABLE
    • master_MDL-34755
    • Hide
      1. Create a SCORM activity
      2. Set display package to "New Window"
      3. View the activity in IE8 (compatibility mode off)
      4. Click "Enter" - activity will open in a new window (as expected)
      5. Turn on IE8 compatibility mode
      6. Click "Enter" - activity will open in the current window (not expected)
        Please re-test in Other browsers too - esp FF/Chrome
        (NOTE TO TESTER: pop-ups in 2.3 are dumb... MDL-33755 has a planned improvement)
      Show
      Create a SCORM activity Set display package to "New Window" View the activity in IE8 (compatibility mode off) Click "Enter" - activity will open in a new window (as expected) Turn on IE8 compatibility mode Click "Enter" - activity will open in the current window (not expected) Please re-test in Other browsers too - esp FF/Chrome (NOTE TO TESTER: pop-ups in 2.3 are dumb... MDL-33755 has a planned improvement)

      Due to some odd behaviour in old versions of IE, the JS that binds the onsubmit code fails in IE7 and IE8 in compatibility mode.

      To reproduce:

      1. Create a SCORM activity
      2. Set display package to "New Window"
      3. View the activity in IE8 (compatibility mode off)
      4. Click "Enter" - activity will open in a new window (as expected)
      5. Turn on IE8 compatibility mode
      6. Click "Enter" - activity will open in the current window (not expected)

      For more details see:

      http://stackoverflow.com/questions/95731/why-does-an-onclick-property-set-with-setattribute-fail-to-work-in-ie/
      http://msdn.microsoft.com/en-us/library/ie/dd347148(v=vs.85).aspx

      The problem line is in mod/scorm/view.js L18.

      Initially I tried using the YUI Events library to bind the onsubmit event, thinking that it would abstract away any differences but that didn't seem to work for me.

      What did work was to change from using YUI:

      var scormform = Y.one('#scormviewform');

      to plain javascript:

      var scormform = document.getElementById('scormviewform');

      and then replacing the setAttribute call:

      scormform.setAttribute('onsubmit', "window.open('','Popup','"poptions"'); this.target='Popup';");

      with:

      scormform.onsubmit = function()

      {window.open('', 'Popup', poptions); this.target='Popup';}

      ;

      that fixed it for me in IE while it still works in Firefox, Chrome and IE8 with compatibility off.

            danmarsden Dan Marsden
            simoncoggins Simon Coggins
            Sam Hemelryk Sam Hemelryk
            Michael de Raadt Michael de Raadt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.