Text Entry Fields Lose Focus Immediately

Aug 27, 2021

I need to make an edit to a Storyline 360 course I last updated in 2020. When I load the *.story file and preview the slide where I need to make the edit--and I'm doing this BEFORE making any edits--I see that it no longer works correctly.

The page is an interactive hazardous waste form. The learner is asked to fill out the form correctly based on some information provided about the hazardous waste plus some other necessary info like "today's" date, the room number and phone number, etc.

Most of the entries on the form--for example, the Building field and the Room number field--are implemented as text entry fields into which the learner is supposed to type the correct value. Triggers then check to make sure the value is correct. If it is, another trigger changes the outline around the field to green. If it isn't, a trigger changes the outline around the field to red instead. These triggers run when the field loses focus.

Back in 2020, when I last updated this file, this code worked perfectly. But today when I load the same file into the more recent version of Storyline 360, several fields lose focus immediately upon page-launch, even though they've never been given focus yet and hence shouldn't be triggering code that runs when they lose focus.

I've extracted the slide that shows this problem and have simplified it somewhat by removing some of the fields that also lose focus immediately. It's attached to this post.

The Building and Room fields and their associated triggers are very similar, yet one (Building) doesn't lose focus on page launch, and the other (Room) does. Why? And how do I prevent this weird focus-loss from triggering my field validation checks (which mark these fields as containing incorrect values even before the learner has had a chance to enter any)? Why do only some fields's lose focus triggers run immediately while others that are essentially identical do not?

6 Replies
Ray Cole

Hi Lauren,

Thank you for giving it a try and for the video of what you saw when you did! That is definitely not what I see when I launch the page. However, I am running a different Storyline build--I'm on Build 3.54.25674.0

I will try updating to the latest Build and see if that clears things up. I will report back here after I've done so. 


Mary Adams

Hi Ray. I am new to Storyline, but I want to do what you did, where triggers check to make sure the value is correct. If it is, another trigger changes the outline around the field to green. Do you have any advice on how to do this? I have a "check answers" button that takes you to another correct or incorrect screen, but that's not really what I want. Thanks for any help you can provide or point me toward to figure  this out.

Ray Cole

Hi Mary and Steven,

As it turns out, I did get an email notification so I guess I am still subscribed to this thread.

Mary, if you download the Storyline file I attached to my original post, you can see how I implemented the field validation for the form. For example, click into the text field to the right of the Building label on the waste form:

Example Setup

In the Storyline timeline, that text entry box is called Building. Right below it on the timeline stack is a rectangle object called Building Outline.


The Building Outline rectangle has a Correct and an Incorrect state:

Correct and Incorrect States

The Correct state has no fill and a green line (outline) around it. The Incorrect state has no fill and a red line (outline) around it.

Here are the triggers attached to the Building text entry field:


The first trigger sets the variable A1_Building to whatever value the learner types into this text entry field.

The second trigger sets the state of the Building Outline rectangle shape to Correct (green outline around the field) if the A1_Building variable equals the correct value of 62.

The third trigger sets the state of the Building Outline rectangle shape to Incorrect (red outline around the field) if the A1_Building variable is not equal to 62 and it's also not equal to (blank). That check for (blank) is to prevent the outline from turning red if someone clicks into the field accidentally and then clicks out of it without typing anything--we don't want to mark that as wrong until they've actually entered some actual value into the field.

The fourth trigger shows a layer that gives some hints about what might be wrong if the A1_Building variable is not equal to 62 as it should be.

And finally, the last trigger hides that feedback layer when the learner enters the correct value (62) into the field (so that A1_Building equals 62).

That's it. These days, to help people whose color-blindness makes it hard for them to distinguish between green and red, I'd probably add a red "x" to the Building Outline's Incorrect state, and a green checkmark to its Correct state. But the basic setup and set of triggers would be the same.