Chat system bugs

Status
Not open for further replies.
I installed a temporary fix into the code so you will get a nice message if the problem surfaces again. Ralle will have to look into this and I'm sure he'll have it fixed in no time.
 
I think I've tracked down the cause of the scrolling bug:
innerHTML!

It would be good to remove all instances of "innerHTML" from your code, but for now let's get rid of the major one, this should fix it:
Code:
// In your addMessage function, replace
    html = '<div style="padding-top: 1px; padding-bottom: 2px; padding-left: 1px;">'+html+'</div>';
// With
    var div = document.createElement("DIV");
    div.innerHTML = html;
    div.style.paddingTop = "1px";
    div.style.paddingBottom = "2px";
    div.style.paddingLeft = "1px";
// And
        chatWindow.innerHTML = chatWindow.innerHTML + html;
// With
        chatWindow.appendChild(div);
 
Status
Not open for further replies.
Back
Top