Tries to fix cursor placement problem in chat write area reported by Emil Ivov.