Workaround for the issue #1474

This is a workaround for the issue #1474 and underlying [webkit bug](https://bugs.webkit.org/show_bug.cgi?id=90206).
The problem seems to be happenning in webkit if the selection spans to the very end of the textarea content, so the workaround adds a trailing character to the textarea.