You should listen to the Bootstrap event when something crashes. Here is some information here . Then scroll to the end of the chat window.
This script should be at the end of your page (after the bootstrap and jQuery script tags)
<script> var panelBody = $("#chat-list") $('#collapseOne').on('shown.bs.collapse', function () { panelBody.stop().animate({scrollTop:panelBody.prop("scrollHeight")}, '100', 'swing') }) </script>
source share