Thats iPhone feature “Shake to Undo” when typing in text message, email message, website address, entering keywords in searching, notes, and etc.
If you shake your iPhone before you type anything while in those areas, you’ll get “Nothing to Undo” pop up. That means shake can't undo anything as nothing has been typed in.
If you have typed something and shake the iPhone – you’ll get “Undo Typing” pop up
If you erase what you have just typed in and shake the iPhone – you’ll get “Redo Typing” pop up, and doing so twice will also give you both Undo and Redo two options on one pop up.
Sometime a little similar shake also bring that pop up if you are still in any typing/texting mode.
Annoying but useful sometimes.