handle undo as exception to simplify normal flow
move waitForInput after showComponent into showComponent