Textbox - weird problem

Hello

I try to develop a textbox control for GUI usage in GE.
Generally it is working well, though sometimes the blinking caret goes crazy.
Any ideas why ?

Attachments

txt.blend (188 KB)

I managed to do quite a better version, see http://blenderartists.org/forum/showthread.php?p=1444942#post1444942