I have a hotspot off screen that triggers a lightbox on a keypress. It works properly on the first press, but subsequent keypresses do not trigger the lightbox again. Suggestions?
Seems like an issue with losing focus after the first keypress. If you change the trigger to a click trigger, such as clicking on the hotspot, you can launch the lightbox repeatedly.
I tried adding a variable, toggling the value of the variable with a keypress, and showing the lightbox on variable change. This works, but ONLY if you first click the course window before each keypress.
So, press Z, close lightbox, click in course window, press Z again. (file attached)
Marty, you might want to take a look at this thread. It may provide some help, although it appears to be an issue. Brian's solution is as close as you can get from what I've been able to accomplish and based on the aforementioned thread.
Unfortunately I don't see what I did as being a solution, just a troubleshooting step to verify that it is the loss of focus preventing the keypress trigger from working. I believe in a real world scenario that a solution like this would be too unintuitive to be of any use...
If there is indeed a focus issue with keypress triggers, and it sounds like there is from the post that Michael shared, then your best bet is going to be using a click or tap rather than a keypress, unfortunately.
8 Replies
Hello Marty!
Would you happen to have a file we could look at? It might be easier to diagnose if we can look at the file.
Here you go. Keypress is 'z'
I'm unable to tell what the issue is in storyline. Maybe someone else can offer assistance with that.
However the function works perfectly when you publish and view the HTML5 version of the module.
Thanks Preston. Interesting that it works in html5.
I did find an older post similar to mine where a (workable) resolution was not found.
Seems like an issue with losing focus after the first keypress. If you change the trigger to a click trigger, such as clicking on the hotspot, you can launch the lightbox repeatedly.
I tried adding a variable, toggling the value of the variable with a keypress, and showing the lightbox on variable change. This works, but ONLY if you first click the course window before each keypress.
So, press Z, close lightbox, click in course window, press Z again. (file attached)
Marty, you might want to take a look at this thread. It may provide some help, although it appears to be an issue. Brian's solution is as close as you can get from what I've been able to accomplish and based on the aforementioned thread.
Unfortunately I don't see what I did as being a solution, just a troubleshooting step to verify that it is the loss of focus preventing the keypress trigger from working. I believe in a real world scenario that a solution like this would be too unintuitive to be of any use...
If there is indeed a focus issue with keypress triggers, and it sounds like there is from the post that Michael shared, then your best bet is going to be using a click or tap rather than a keypress, unfortunately.
Thanks folks. Given that what I was doing was just a desirable feature, I'll forgo that activity and move along.
This discussion is closed. You can start a new discussion or contact Articulate Support.