Author Message

Posted: Mon Apr 16, 2018 10:43 am   Post subject: Internet Explorer - browser window closing


Got an odd problem.

We've used iSpring to produce a SCORM compliant e-learning module.

For presentation on our staff intranet, I've created an <iframe> inside a Bootstrap modal dialog, which loads the iSpring generated HTML file (i.e. res/index.html).

All was working fine until we tested it on Internet Explorer (latest version). When the user closes the Bootstrap modal dialog, the entire browser (or browser tab) closes - meaning that the user has to restart their browser session. This only seems to happen in Internet Explorer (and not, for example, in Chrome).

Having done some testing, we can see "window.close()" in the two JavaScript files that index.html loads (lms.js and data/player.js) - so I'm assuming some logic somewhere is causing the <iframe> to close the browser tab.

We don't want this behaviour - any ideas on how to prevent it happening?



Profile profile test

Posted: Mon Apr 16, 2018 3:34 pm   Post subject: Re: Internet Explorer - browser window closing

Yes, this is a known behavior in IE. The same does not happen in other browsers.

To solve this issue, you need to comment the following function in player.js (which is in the data folder):
function fc() {
try {
gc || ("", "_self", ""), window.close())
} catch (a) {}

To ease this, please use the JS beautifuler:
This function was added to close windows on mobile devices.
Basically, this function closes the window with a launched course. At the same time, the LMS player is out of an SCO control, because this is prohibited by the SCORM specifications.

Additionally, disabling this function can be a workaround for this LMS, but this may not work on mobile devices and in some other LMSs.

Profile profile test
Display posts from previous:  Sort by  


Who is online
Who is online In total there are 19 users online :: 2 registered, 0 hidden and 17 guests (based on users active over the past 5 minutes)
Most users ever online was 1039 on Sun May 09, 2021 3:50 pm

Registered users: Bing [Bot], Google [Bot]