Forum Discussion
ThilagamSakkara
2 years agoCommunity Member
change NumericEntry without losing focus
Trying to perform some actions when NumericEntry changes its value when having a focus in it. Found some discussion about changing Text entry without losing focus. The solution provided in that discussion is:
document.querySelector('.acc-textinput').addEventListener('keyup', () => {
document.querySelector('.acc-textinput').blur();
document.querySelector('.acc-textinput').focus();
});
I have tried replacing (.acc-textinput) with (.acc-numericinput) and document.querySelector('#NumericEntry'). Both not working. Any help would be much appreciated!
- Jürgen_Schoene_Community Member
there is no difference between the selectors of text input and numeric input
blue = text input
green = numeric input
both can be selected with ".acc-textinput"perhaps your problem was the search result of "querySelector"
querySelector: if there are more than one input fields on the slide, the first element for this selector is found