Ask coding questions

← Back to all posts
`removeChild()` not working on `document.body`

I tried to make an "Scratch-like-software", and, it has an error. I need to expect this: When a user clicks at a block, it is now added. But, when a user clicks a input, the input deletes the latest block ( like it wasn't there, because, the block's click acts too. ) . But suddenly, an error appears, every time you click a input of a block.