Should be partially fixed on next update, this happens because there is a delay between you pressing the button and the client being ready to present data, if you open chat at the same time the NUI focus will be wrong.
Not an ideal fix, and wont be fixed properly until the inventory is merged and fully rewritten (- split atm) I'm sure there is ways around it like spamming Y + T at the same time etc so just be careful.