iPhone screen goes black when camera is covered
[Re-Titled by Host]
That's where the proximity sensor is. It does that by design. It's there to detect when you're holding the phone up to your face so you don't accidentally press buttons with your cheek while on a call.
iPhone screen goes black when camera is covered