Help! Storyline 2: iFrame Content Automatically Grabs Focus in Web Browser

Jan 06, 2015

Hello. I embed Storyline objects in HTML files using an iframe. In the past, I stopped the page from jumping down to the Storyline (1) file by commenting out the following in the story.js file (as described here: http://www.articulate.com/support/storyline-2/iframe-content-automatically-grabs-focus-in-web-browser-sl2):

case "BW_RestoreFocus":
var oPlayer = GetPlayer();

try
{
oPlayer.tabIndex = 0;
oPlayer.focus();
}
catch (e)
{
}
break;

 

However, this same snippet of code is not included in the Storyline 2 output. When commenting out the following similar code in the Storyline 2 output, I have no luck in IE:

case "BW_RestoreFocus":
SetPlayerFocus();
break;

Any suggestions? 

 

Thanks!!

5 Replies
Ashley Terwilliger-Pollard

Hi Lindsay,

If you use an iFrame to embed a published Articulate Storyline course into a web page, you may find that the web page automatically scrolls down to the iFrame when it's viewed in Internet Explorer or Firefox.

This results from a browser conflict with code that allows keyboard commands to function as soon as a page loads. Use any of the following options to avoid this behavior. 

Ashley Terwilliger-Pollard

Hi Stu,

Thanks for reaching out here - I hadn't seen any other fixes other than the one mentioned in that article above, and JS code is not something I can assist with - but I see you also posted here and may have created a fix.  Just wanted to link to the two threads for anyone who may stumble upon this one! 

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