Forum Discussion
PaulDeHorn
8 years agoCommunity Member
Change Text Entry Variable without control losing focus?
Does anyone know of a way to change a text entry variable without control losing focus first? I'm simulating software behavior where as soon as a number is typed a description appears. Currently, I ...
GavinElliott-89
Community Member
Jillian, you are a life saver. This was also driving me crazy until I came across your post. Thank you so much.
The jQuery didn't work for me for some reason, so I used standard JavaScript. It's below if anyone else needs it.
The '.acc-textinput' is the class name of the text input box in the Storyline module. I'm assuming this is always the same, but if Articulate ever change the name in the future this code won't work.
document.querySelector('.acc-textinput').addEventListener('keyup', () => {
document.querySelector('.acc-textinput').blur();
document.querySelector('.acc-textinput').focus();
});
PhilMayor
5 years agoSuper Hero
jquery is no longer part of a storyline pacjkage so you have to remember to load it first