As Jocko says the glass can sometimes be moved by hand independent of the motor. . You may hear some ratchets clicking as you move it. Its possible if you push or pull too hard the glass may unclip. But this is normal procedure when replacing a broken mirror glass. It should be fairly obvious how to click it back in place. A previous owner may have replaced the glass but not clipped it in properly.
I had to replace a glass on my Yaris, but there were two types. Needless to say I bought the wrong one which almost fitted but caught on the mirror housing at extreme adjustment. If all else fails check the mirror glass is the correct one.