Refresh the image count as user types (#936)

* Refresh the image count as user types

Currently I have to change the focus for the image count to refresh. This change makes it immediate. I've been wondering if 'change' should merely be replaced by 'keyup' but decided against it for accessibility reasons (people who might be using accessibility tools with alternative input methods).

* Add a debounce

Setting a debounce of 300ms on keyup.
This commit is contained in:
patriceac
2023-03-13 22:07:55 -07:00
committed by GitHub
parent 1fda12640f
commit d26e646a94

View File

@ -1204,7 +1204,9 @@ function renameMakeImageButton() {
}
}
numOutputsTotalField.addEventListener('change', renameMakeImageButton)
numOutputsTotalField.addEventListener('keyup', debounce(renameMakeImageButton, 300))
numOutputsParallelField.addEventListener('change', renameMakeImageButton)
numOutputsParallelField.addEventListener('keyup', debounce(renameMakeImageButton, 300))
function onDimensionChange() {
let widthValue = parseInt(widthField.value)