Default [Q] Keyboard on lock screen preventing unlock

Hi,

I am wondering if anyone can help me solve a dilemma that seems to keep happening to me while I test out different roms and kernels trying to find the best one for my needs.

The issue that I keep running into is that I keep getting a bug that doesn't allow for keyboard to close on pressing the lock button: which blocks the slider, pulling down the notification tab: keyboard is still on top or when trying to use the power menu the keyboard remains on top.

Does any know a fix or a way to disable this issue? I am tired of having to restore the phone to full factory mode every time it starts happening to remedy the situation.

More info:
I am currently on stock with the keyboard still acting up and don't want to have to reset my phone because that is a major pain in the ass.