anchor.diff:      var registerScrollHandler = function(){
           var lastScrollTop = 0;
           var isFetchingLines = false;
  -        $('.ui-tabs-panel').scroll(function(){
  -            var panel = $(this);
  -            var filename = filesByIndex[panel.index()];
  +        var scrollhandler = function(){
  +            var tab = $('.ui-tabs-active');
  +            var index = tab.index();
  +            var filename = filesByIndex[index];
  +            var panel = $('#ui-tabs-' + index);
  +
   
               var currentScroll = panel.scrollTop();
               var isDownScroll = isDownScrollDetect(lastScrollTop, currentScroll);
  -            if (!isFetchingLines && isDownScroll && (panel[0].scrollTopMax - 20) <= currentScroll){
  +            var distanceToBottom = panel[0].scrollHeight - panel[0].clientHeight - currentScroll;
  +            if (!isFetchingLines && isDownScroll && distanceToBottom < 50){
                   debug('downward scroll, near bottom - so loading next lines.');
                   isFetchingLines = true;
                   var downurl = '<aksess:geturl url="/admin/tools/logreader/logfiles/"/>' + filename + '.action?startline=' + (currentLine + numberOfLinesToFetch);
  
positive.code:             }
  
              lastScrollTop = currentScroll;
          });
      };
  
      $('#controlls').submit(function () {
  
negative.code:         return url;
      };
      var isDownScrollDetect = function(lastScrollTop, currentScroll){
          return currentScroll > 0 && currentScroll >= lastScrollTop;
      };
  
      var tabheaderUl = $('#tabheaders');
  