Fix emote insertion behavior

This commit is contained in:
calzoneman 2015-05-12 13:53:19 -05:00
parent 389dd0d5ab
commit 691ec3055c

View file

@ -2915,9 +2915,12 @@ EmoteList.prototype.loadPage = function (page) {
img.title = emote.name;
img.onclick = function () {
var val = chatline.value;
if (!val || val.charAt(val.length - 1).match(/\s/)) {
if (!val) {
chatline.value = emote.name;
} else {
if (!val.charAt(val.length - 1).match(/\s/)) {
chatline.value += " ";
}
chatline.value += " " + emote.name;
}