How do elevators know to keep the doors open when somebody sticks their arm in between them?

I'd love specifics on how the "sensors" work. Have they ever failed and injured someone?
25 answers 25