1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-10-31 14:10:08 +00:00

Attempt to improve performance of javascript code

Prevent bubbling of scroll event in .timsChatMessageContainer in order to avoid some rather expensive scroll handlers
This commit is contained in:
Tim Düsterhus 2013-12-08 17:43:14 +01:00
parent 5280a3aba9
commit 0c9eecda61

View File

@ -293,6 +293,8 @@ Scroll down when autoscroll is being activated.
$('.timsChatMessageContainer.active').scrollTop $('.timsChatMessageContainer.active').prop 'scrollHeight' $('.timsChatMessageContainer.active').scrollTop $('.timsChatMessageContainer.active').prop 'scrollHeight'
$('.timsChatMessageContainer.active').on 'scroll', (event) -> $('.timsChatMessageContainer.active').on 'scroll', (event) ->
event.stopPropagation();
element = $ @ element = $ @
scrollTop = element.scrollTop() scrollTop = element.scrollTop()
scrollHeight = element.prop 'scrollHeight' scrollHeight = element.prop 'scrollHeight'