Keyboard loses focus when opening HUD element

I was using a flip/flop, clearly not the way!

I followed the link and while it does work, the UI seems to stretch across the whole screen which is not intended