How can I fix this Nexus 4 erratic ghost/phantom touch input issue? I have a Nexus 4 16GB stock on 4.2.

It is experiencing a ghost/phantom touch issue, as you can see here:

http://www.youtube.com/watch?v=f61TPtL4WBk

This doesn't happen all the time, but it does happen regularly (every 5-10 minutes) in Chrome, Dropbox, the stock Settings app and an app I'm developing.  It doesn't happen on the homescreen, though - at least not that I've noticed.  It may happen only when the device is warm, but I can't really tell as it's not that consistent.

I tried updating to 4.3 (using the standard OTA) and the touchscreen becomes completely unresponsive, like this:

http://www.youtube.com/watch?v=QSt5GFSTr0E

In this state you can't even unlock the phone, though it is responsive as you can see.  I also tried sideloading 4.4 onto the phone, and this didn't work.  I tried rebooting (by holding power for 10 seconds), going into fastboot and wiping the phone and nothing would enable the touchscreen to come alive.

I then restored the phone back to stock 4.2 (using instructions from here) which allows the touchscreen to work, but the original ghost/phantom touch problem remains.

Any ideas please?
have the same issues as the first bloggers that posted.

I have the Nexus 4 16Gb and in February 2014, I cracked the screen and changed the digitizer.  In the process I tore the lithium polymer bag for the battery and subsequently the phone started to have a sweet smell. After 5 days the phone started acting up with these ghost images which was typing the same random characters in Google Plus, the camera took photos by itself, it shut off by itself and made squealing noises and just have been crazy. Only upon plugging in the phone into the adapter charger would stabilize and use it on a regular basis.

After reviewing several blogs, one person recommended changing the battery, which I did and this has fixed the phone. I've had a new battery in the phone for over 4 days now and it's working perfectly fine. I am running Kit Kat 4.4.2 and have all of the different kinds of apps installed on the phone. screen replacement and battery replacement can be found on YouTube.

FIRST! Change your battery, don't give up the phone. Spend the money ($21 Amazon) and don't regret because you didn't try to change the battery and see if it works again.

Hope this helps and pass it on to others you may know!

**UPDATE:  Apr 13, 2014.  Phone is working as normal using USB charge and wall charger.  IT'S THE BATTERY CAUSING THE GHOST IMAGES.