FIXED! - iFrame Content Automatically Grabs Focus in Web Browser and jumps down to the player... Sorted

Jul 09, 2015

Hi everyone, I've been trying to fix an issue that a lot of people have been having in I.E when using an iframe to embed the Storyline player. Internet explorer jumps to the embedded player so any content above the iframe/storyline piece will be missed by the user unless the scroll up. 

There was an article published on how to fix this but for some reason, it didn't seem to work. Since then it looks like SL2 may have had an update. I've had a root around and I've found out how to stop the browser from jumping.

If you open the folders to your StoryLine 2 file > Go to the folder called story_content > Then open the file called Story.js (I'd advise to right click and open it with notepad or Dreamweaver)

Then find the section this section of code (note: if you are using notepad or Dreamweaver to change the code, press 'Ctrl' or 'cmd' and the 'F' key to do a quick search and then copy and paste this into the pop up: window oPlayer.tabIndex =

It should find the section a lot faster than you having to trawl through to find it yourself)

var oPlayer = GetPlayer();

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

 

Next:

All you need to do is to place /* at the beginning of the code and */ at the end of the parentheses so it look like this:

/*var oPlayer = GetPlayer();

try
{
oPlayer.tabIndex = 1;
oPlayer.focus();
}
catch (e)
{
}*/

 

Then:

Upload the story.js file to your web server and it should stop jumping and act as you would normally expect.  Note: You may need to clear you cookies and cache for the web browser to recognise the change. But it should work after that.

Cheers, 

Stu

 

3 Replies
Jonathan Harvey

Hi there,
We've implemented this fix before.  However it unfortunately doesn't work if you have any objects on the slide that acquire focus in themselves (such as text entry fields).  These appear to override the code in the JS file and cause the page to still jump down.

You wouldn't happen to have a fix for this would you?

Ashley Terwilliger-Pollard

Hi Jonathan,

I'm not sure if Stu is still subscribed here, as the post is a bit older - but you could always use the "contact me" button on a ELH users' profile to reach out to them directly! The Javascript elements aren't something that our team is able to help with - but lots of community experts who can hopefully weigh in! 

Best of luck with your project! 

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