avoid posting empty comments

Hi,

This fixes bug: #3836

I added a Jasmine test for the scenario, but it gets me an error:
'Cannot call method trim of undefined'.
I couldn't find out why it complains. I have never used Jasmine before, but have used Rspec and Cucumber.
It would be great If someone can have a look at the Test and give some advice to finish this issue.