Comments explaining scrolling.

This commit is contained in:
perroned 2014-09-11 09:28:41 -07:00
parent 61d2a959c8
commit 708427422b
2 changed files with 3 additions and 3 deletions

View File

@ -125,7 +125,7 @@ Template.chatbar.helpers
# Scrolls the message container to the bottom. The number of pixels to scroll down is the height of the container
Handlebars.registerHelper "autoscroll", ->
$('#chatbody').scrollTop($('#chatbody')[0]?.scrollHeight)
""
false
Template.optionsBar.events
'click .private-chat-user-entry': (event) -> # clicked a user's name to begin private chat

View File

@ -11,7 +11,7 @@
<li {{messageFontSize}}>{{> message}}</li>
{{/if}}
{{/each}}
<li></li>
<li></li> <!-- Intentionally blank, fixes issue what last message being cut off while scrolling -->
</ul>
</div>
<div class="panel-footer">{{> chatInput}}</div>
@ -53,7 +53,7 @@
</tr>
</table>
<div style="color:{{colourToHex message.from_color}}">{{{sanitizeAndFormat message.message}}}</div> <!-- Messages must be safely filtered and stripped -->
{{autoscroll}}
{{autoscroll}} <!-- Scroll to the bottom after inserting a new message -->
</template>
<!-- Displays the list of options available -->