first try instant scrolling, then delayed
This commit is contained in:
parent
96a96af7c8
commit
f5088d54b0
|
@ -342,14 +342,16 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
|||
$rootScope.scrollToBottom = function() {
|
||||
// FIXME doesn't work if the settimeout runs without a short delay
|
||||
// 300 ms seems to do the trick but creates a noticable flickr
|
||||
$timeout(function() {
|
||||
var scroll = function() {
|
||||
var readmarker = document.getElementById('readmarker');
|
||||
if(readmarker) {
|
||||
readmarker.scrollIntoView();
|
||||
}else{
|
||||
window.scroll(0, document.documentElement.scrollHeight - document.documentElement.clientHeight);
|
||||
}
|
||||
}, 300);
|
||||
}
|
||||
scroll();
|
||||
$timeout(scroll, 300);
|
||||
}
|
||||
|
||||
$scope.sendMessage = function() {
|
||||
|
|
Loading…
Reference in New Issue