iPhone not reacting when connected to electricity today in the morning when my phone woke me up i couldn't turn off the alarm clock (you just have to swipe to the left and everything is fine). It didn't respond to any touch gesture till i disconnected the phone from the power supply. After that everything went well! 
What was that? Could it be that the phone got too much power??
What type of cable are you using? I've seen similar behaviour with


Poor quality third-party Lightning cables
A poor quality USB charger


I think there must be some form of 'leakage' which affects the working of the touch screen when using some sub-standard chargers/cables. I'd suggest either changing your cable or charger and seeing if that helps.