Ind.ie is now Small Technology Foundation.
Commit a7ee70f4 authored by Aral Balkan's avatar Aral Balkan

Conversation timelines now scroll to the bottom on entry.

parent f0430320
......@@ -36,7 +36,7 @@ window.addEventListener('load', function(){
// Currently, we only care when the child list changes.
var mutationObserverOptions = {childList: true};
var messages = document.getElementById('messages');
mutationObserver.observe(messages, mutationObserverOptions);
//
......
......@@ -42,9 +42,13 @@ window.addEventListener('load', function(){
// Currently, we only care when the child list changes.
var mutationObserverOptions = {childList: true};
var messages = document.getElementById('messages');
mutationObserver.observe(messages, mutationObserverOptions);
// Make sure we start by showing the bottommost message
var lastMessage = messages.lastElementChild;
lastMessage.scrollIntoView();
//
// Poll every two seconds for new messages.
//
......
......@@ -28,7 +28,7 @@ window.addEventListener('load', function(){
// Currently, we only care when the child list changes.
var mutationObserverOptions = {childList: true};
var messages = document.getElementById('messages');
mutationObserver.observe(messages, mutationObserverOptions);
setInterval(function(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment