浏览代码

Merge pull request #1756 from afshin/scroll-fix

Hover box initial position bug fix
Steven Silvester 8 年之前
父节点
当前提交
3411a8f8bb
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/common/hoverbox.ts

+ 2 - 2
src/common/hoverbox.ts

@@ -128,8 +128,8 @@ namespace HoverBox {
 
 
     // Make sure the box ought to be visible.
     // Make sure the box ought to be visible.
     let withinBounds = maxHeight > minHeight &&
     let withinBounds = maxHeight > minHeight &&
-                       spaceBelow >= lineHeight &&
-                       spaceAbove >= anchorRect.top;
+      (spaceBelow >= lineHeight || spaceAbove >= anchorRect.top);
+
     if (!withinBounds) {
     if (!withinBounds) {
       node.classList.add(OUTOFVIEW_CLASS);
       node.classList.add(OUTOFVIEW_CLASS);
       return;
       return;