My iPad was driving me nuts. While using the Mail app, anytime I laid the iPad on my lap a prompt would appear asking if I wanted to undo an action, which I would have to touch "no". This week I had had enough and took the time to find the option to remove the annoyance, which turned out to be "Shake to Undo", as shown below and located in Settings ... Accessibility. I just moved the slider to the left to disengage, problem solved. Why the iPad thought the motion of just laying the iPad down was a "shake" is still a mystery.