As I understood you want to disable button. but you currently set it as readonly, not disabled
button.readonly = !allFilled
change this to
button.disabled = !allFilled