Comments explaining scrolling.
This commit is contained in:
parent
61d2a959c8
commit
708427422b
@ -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
|
||||
|
@ -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 -->
|
||||
|
Loading…
Reference in New Issue
Block a user