浏览代码

HUE-6077 [frontend] Fix jHueScrollUp positioning for the file viewer

Enrico Berti 8 年之前
父节点
当前提交
d2e2212
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      desktop/core/src/desktop/static/desktop/js/jquery.scrollup.js

+ 1 - 1
desktop/core/src/desktop/static/desktop/js/jquery.scrollup.js

@@ -87,7 +87,7 @@
 
 
     huePubSub.subscribe('reposition.scroll.anchor.up', function(){
     huePubSub.subscribe('reposition.scroll.anchor.up', function(){
       $('#jHueScrollUpAnchor').css('right', '20px');
       $('#jHueScrollUpAnchor').css('right', '20px');
-      if (!$(_this.element).is('body')) {
+      if (!$(_this.element).is('body') && $(_this.element).is(':visible')) {
         var adjustRight = $(window).width() - $(_this.element).offset().left - $(_this.element).width();
         var adjustRight = $(window).width() - $(_this.element).offset().left - $(_this.element).width();
         if (adjustRight > 20) {
         if (adjustRight > 20) {
           $('#jHueScrollUpAnchor').css('right', adjustRight + 'px');
           $('#jHueScrollUpAnchor').css('right', adjustRight + 'px');