change NumericEntry without losing focus

Feb 16, 2023

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!

1 Reply
Jürgen Schoenemeyer

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