Articulate not catching exceptions when attempting to resize parent window.

Jun 22, 2018

Using Articulate Storyline version 2.12.1705.520 the exported module ( I assume with Scale player to fill browser window turned on) fails on the following line if due to cross-origin restriction it is unable to resize the parent window.

browser.ResizeFullScreen = function() {
    top.moveTo(0, 0);
    top.window.resizeTo(screen.availWidth, screen.availHeight)
}

The module would be able to recover from this state if it caught the resulting exception and implemented an appropriate fallback.

This for us resulted in a working flash implementation of the module but a broken HTML5 version the module, The module would initialize its connection to SCORM, but after the failed window resize no more messages would be sent.

The module also would not report there was a problem, resulting in learners completing the course but not having any completion recorded against them. 

As mentioned on MDN firefox no longer allows windows or tabs to be moved that haven't been created by window.open and also no longer allows a window with more than one tab to be resized, so this assumption could affect more than just cross-origin frames.

10 Replies
Paul Esson

Technically I'm running into these issues on Chrome, This issue will happen
on chrome if the parent window is on a separate domain to the child window.

I was just pointing out that this logic would *always* break on Firefox.

The exception should be handled by the e-learning module and therefor the
code provided by the authoring tool, It also should be a very simple to fix.

Ashley Terwilliger-Pollard

Hi Paul, 

I'm a little lost on your described set up and issue, so bear with me while I try to clarify! 

Are you using the Storyline settings that set the browser size in the player without selecting the option to launch your course in a new window, and not seeing this work (i.e. the browser won't resize)? It also sounds like this is happening in your LMS, so I'm curious if you've tried it in any other environments such as SCORM Cloud? That would help narrow down if the LMS is also blocking this function.

Paul Esson

Yes, I think that is the way the module has been compiled. I suspect the
module might work in SCORM cloud. The specific issue occurs (in chrome) if
the module is on a different domain than the parent window.

In our case the modules are hosted on a subdomain (elearning.)
and the external frame is just . This would also occur if you
embedded SCORM cloud in an iframe on a site.

The module is assuming that it is not in a cross domain iframe. It should
not make this assumption.

It shouldn't be the responsibility of LMS to work around bugs that occur in
modules due to incorrect assumptions, as long as the LMS and the module
implement the agreed standards, they should work.

Technically Chrome is blocking this method from being called, not the LMS.

Knut Jackowski

Not sure you will get this recognized as a bug. The agreed standard here is SCORM, of which the people at Rustici, the people involved enough with this standard, that they own the domain scorm.com, say:

"Basically, SCORM requires that content be served from the same domain as the LMS API."

https://scorm.com/blog/2013/04/solving-the-scorm-cross-domain-issue/

Ashley Terwilliger-Pollard

Thanks, Paul. It sounds like you're setting the browser to fill the screen, but not launching it in a new window? This used to work in older browsers but no longer does due to heightened security and browsers restrictions. 

If you want the browser to fill the screen and launch the course in a new window, you'd likely want to set the browser setting back to the default of Display a users current browser size. You'll find details on this in Storyline 2 in this tutorial. 

Paul Esson

There seems to be some confusion, the LMS API is in the same domain as the module.

The module and the API are both in the elearning subdomain but the parent window is not.

The referenced article is talking about the difficulty locating the API object if the module is located on a different domain to the API. Since this isn't the case the module has no issue locating and using the API object, the module only fails when it crashes due to an uncaught exception.

This creates a confusing user experience since from the users perspective the module appears to be working, but since the javascript has crashed they get no SCORM recorded against it.  

If you don't consider this a bug feel free to close this issue, I just think it has the potential to provide frustration for your customers. I clearly think it is a bug or I wouldn't have bothered bringing it to your attention, my expectation would be that a module would at least alert me to a failure and ideally recover.

Thanks,

Paul

Ashley Terwilliger-Pollard

Hi Paul,

We're always happy to investigate an issue further and determine if this is a bug. As I mentioned the change to how the browser would launch and fill the screen is also based on changes in browser security. 

If you'd like to continue troubleshooting this, let me know and I can open up a Support case so that you can work directly with our Engineers. 

This discussion is closed. You can start a new discussion or contact Articulate Support.