Lightbox "when user presses key" trigger does not work

May 20, 2015


I have a lightbox slide that has a text entry field. I have a trigger set so that a layer is shown when the user presses Enter after typing something in the text entry field. However, the trigger does not work. I have tried different keys as well (such as right arrow) but to no avail. If I use a different trigger (such as when a variable changes) the layer is shown, but I need it to show when the user presses Enter after entering information in the text entry field.  If I show the slide as a regular slide (instead of a lightbox) the trigger works fine. Any ideas?

Thank you,

Greg Tomsho

10 Replies
Greg Tomsho


 After some more testing, I found that the problem only is apparent when using the HTML5 output; it works fine in preview mode or with Flash. I tried reproducing the problem with a simple example and could not.  I hesitate to upload the entire project since it contains some proprietary work, but will try to reproduce the conditions in which the problem occurs and upload that. Thank you.

Ashley Terwilliger-Pollard

Hi Greg,

You mentioned it does work when changing the variable - and since the Enter key acts as a submission trigger to adjust the text entry variable and allow it "lose focus" can you do it when the textentry variable has changed or is equal to something? Also what element is being lightboxed? There was an issue detailed here where a lightbox couldn't be closed with a keypress trigger and that was fixed as a part of Update 5. 

Greg Tomsho

Hi Wendy and Ashley:

I came up with a scenario where my problem occurs. If I call a lightbox from a layer, and that layer has the option "Prevent the user from clicking on the base layer" checked, the text box on the lightbox slide will not respond to key triggers. This only occurs with HTML5 output. Preview and Flash work fine. This appears to be a problem only with HTML5 and only when that option is selected on the layer calling the lightbox (at least, that is what I have narrowed it down to so far). See attached file that demonstrates the problem. You need to publish it and then run the HTML5 version to see the problem, See how it supposed to work using the Flash version or Preview mode.

Tim Shelton

Instead of key presses to enter/modify a trigger just have a small GO!/Submit button next to the text entry that triggers the variable to change. Then have another variable detecting the change of the variable from A to B set to show layer or unhide an object on the base-layer [if your having issues with objects on layers]

Greg Tomsho

Okay, now another problem when the "workaround" to the previous problem is implemented. Now, when the Prevent the user from clicking on the base layer is UNCHECKED, the enter key trigger works but when I close the lightbox, the button on the layer that calls the lightbox is disabled. In my actual project, the entire layer seems disabled and I can't do anything more with the story; I basically have to reload the whole thing. Again, only a problem with HTML5. Here is the same story file with the option unchecked and you'll see after you press Enter in the text box (in the lightbox slide), the layer is displayed as it should. Close the lightbox, and the button that opens the lightbox no longer works. But, it works fine in Preview and Flash.

Greg Tomsho

Tim: Well, I would consider that, but I am creating a simulation (user is entering commands in a simulated Windows command prompt) and having a user required to press a submit button every time they enter a command is cumbersome (and not too realistic) to say the least. Since it works in Flash, it should work in HTML5, so clearly this is a bug, not a feature.

Greg Tomsho

Nick:  As far as I know, the only way to set the focus to a control is to place that control as the last item on the time line. This does not, however, work for HTML5, only Flash. In addition, if your control is on top of another object (like a figure), it will not work since putting the control last on the timeline puts the control behind any other objects it may be sitting on.

There is another thread about this here:

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