I don't have a device, but i'm sure Mrs Physics can easily solve your problem: just find ways to hold it so it just can't slip. For example, when opening the keyboard, put your index fingers on top of the device, so the body can't go forward with the screen