It's the "shake to undo" feature, possibly the most nonsensical thing Apple built into the iPad. Who wants to grab their iPad like an etch-a-sketch while typing instead of just hitting delete? Unfortunately, I have no clue how to disable it. Just try to hold it steadier and keep hitting cancel.