Fix for cursor position in chrome

Fix for issue #19