adium 2745:d8970611ed55: Fix insertion point issues by using que...

commits at adium.im commits at adium.im
Mon Oct 19 19:00:50 UTC 2009


details:	http://hg.adium.im/adium/rev/d8970611ed55
revision:	2745:d8970611ed55
author:		Stephen Holt <sholt at adium.im>
date:		Mon Oct 19 15:00:32 2009 -0400

Fix insertion point issues by using querySelector to remove extra #insert divs

diffs (31 lines):

diff -r 666f93364bb5 -r d8970611ed55 Plugins/WebKit Message View/Template.html
--- a/Plugins/WebKit Message View/Template.html	Sat Oct 17 17:42:31 2009 -0400
+++ b/Plugins/WebKit Message View/Template.html	Mon Oct 19 15:00:32 2009 -0400
@@ -25,7 +25,11 @@
 			this.timeoutID = 0;
 			this.isCoalescing = false;
 			this.shouldScroll = false;
-		
+			
+			function rmInsert() {
+				
+			}
+			
 			function outputHTML() {
 				var insert = document.getElementById("insert");
 				if(insert) 
@@ -56,6 +60,14 @@
 			}
 			
 			this.append = function(html, shouldScroll) {
+				
+				var lastAppend = self.fragment.lastChild;
+				if(lastAppend){
+					var insert = lastAppend.querySelector("#insert");
+					if(insert)
+						insert.parentNode.removeChild(insert);
+				}
+				
 				var newMessage = document.createElement("div");
 				newMessage.innerHTML = html;
 				var children = newMessage.childNodes;




More information about the commits mailing list