How to stop my iPhone screen turning off when I'm making a call?

Whenever I'm making a call on my iPhone and need to input numbers (credit card number while calling the bank, voicemail password, Phone selection menu etc) the screen goes black.
If I tilt it around it flashes on and off but unless i lie it on a flat surface to put the numbers in it stays off. My last iPhone did this too so it's not a fault (unless I'm really unlucky).

How do I stop this from happening?! Its driving me insane!

I have never had that happen even once on my iphone.

  • Why is my iPhone 5 turning off and not turning back on? This has happened twice now. My iPhone 5 has turned off in the middle of the night with a full charge and off the charger, and when I try to turn it back on it takes a couple tries. Has anybody experienced this?
  • My iphone screen keeps turning off during a video, anyone have a solution? My iphone screen keeps dimming and turning off during a video, as if it weren t even on a video. I don't know if this is a software issue or I need to tweak some settings.
  • My iPhone keeps turning on and off like it turns on and off. Can someone tell me? Okay tbms it turns on and off on and off and then sometimes it shows a red screen for a few seconds then off again and dies out. It's not the battery because I got that changed thinking that it was the cause and it wasn't. So is there anything someone can help me with? The repair guy tried restoring it through iTunes he said it didn't work either it just won't come on it doesn't go pass the Apple logo before shutting off and on again and dying out
  • My Iphone is making a weird noise when i call people? My IPhone a couple of days ago started Making loud electrical noises when i Call people but most specifically when I walk around and talk or i talk over the person.id like to find out how to fix it because i don't want to Pay for a new phone. Also i have an Iphone 4.