Forum Discussion
BobBondurant
13 years agoCommunity Member
Setting focus to text entry box in Storyline
Hi. I think I know the answer to this, but I need to ask to make sure. I'm updating a simulation of a mainframe data system, originally recorded in Captivate six years ago. To correctly mimic the...
ATusenius
6 years agoCommunity Member
If you are using Fill-in-the-blanks slides
My colleague wrote a piece of JavaScript for me that focuses directly on the text entry field. Note that this works if you have a single TextEntry field on a fill in the blanks question slide, I do not know if it works for NumericEntry.
setTimeout(function(){
var inputs = document.querySelectorAll('.shown input[type=text][role=presentation]');
console.log('n',inputs.length)
if(inputs.length) inputs[inputs.length-1].focus();
}, 90)
I put it in the trigger 'Execute Javascript when timeline starts on TextEntry'.
- JanetCC6 years agoCommunity Member
Thanks Antje! That worked well. :)