Fix text not shown in Firefox

This commit is contained in:
Victor 2015-12-15 16:27:01 +02:00
parent d3b3b02090
commit 0237933645

View File

@ -243,7 +243,7 @@ Views.prototype.pause = function (duration, hard) {
};
Views.prototype.text_1 = function (text) {
this.textAuthorTag.innerText = "";
$(this.textAuthorTag).text("");
if (TextUtils.isEmpty(text)) this.windowHide("");
else {
this.windowShow("");
@ -256,7 +256,7 @@ Views.prototype.text_2 = function (whoid, text) {
else {
this.windowShow("");
var person = this.characters.get(whoid);
this.textAuthorTag.innerText = person.name;
$(this.textAuthorTag).text(person.name);
this.textAuthorTag.style.color = toColor(person.color);
this.formatString(this.textContentTag, text);
}
@ -276,7 +276,7 @@ Views.prototype.formatString = function (tag, text) {
}
if (edited.contains("{html}")) {
edited = edited.replaceAll("\\{html\\}", "");
tag.innerHTML = edited;
$(tag).html(edited);
return;
}
var codes = ["b","i","s","u","big","small"];
@ -291,9 +291,9 @@ Views.prototype.formatString = function (tag, text) {
}
if (html) {
edited = edited.replace("\n", "<br/>");
tag.innerHTML = edited;
$(tag).html(edited);
} else {
tag.innerText = edited;
$(tag).text(edited);
}
};