Kaynağa Gözat

Fix changelist footer misplacement

Denis K 8 yıl önce
ebeveyn
işleme
8f0ac4851b
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      jet/static/jet/js/src/features/changelist.js

+ 2 - 2
jet/static/jet/js/src/features/changelist.js

@@ -39,12 +39,12 @@ ChangeList.prototype = {
         this.updateFixedHeaderWidth($fixedHeader, $originalHeader);
     },
     updateFixedFooter: function($results, $footer) {
-        if ($(window).scrollTop() + $(window).height() - $footer.outerHeight(false) < $results.offset().top + $results.outerHeight(false)) {
+        if ($(window).scrollTop() + $(window).height() < $results.offset().top + $results.outerHeight(false) + $footer.innerHeight()) {
             if (!$footer.hasClass('fixed')) {
                 var previousScrollTop = $(window).scrollTop();
 
                 $footer.addClass('fixed');
-                $results.css('margin-bottom', ($footer.outerHeight(false) - 20 - 2) + 'px');
+                $results.css('margin-bottom', ($footer.innerHeight()) + 'px');
 
                 $(window).scrollTop(previousScrollTop);
             }