• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Get your art tools and paintbrushes ready and enter Hive's 34th Texturing Contest: Void! Click here to enter!

Chat system bugs

Status
Not open for further replies.
Level 15
Joined
Nov 1, 2004
Messages
1,058
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.
 
Level 27
Joined
May 30, 2007
Messages
2,872
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.
Top