소스 검색

Merge pull request #141 from smiclea/fix-dropdown

Fix dropdown's list position when page is scrolled
Dorin Paslaru 8 년 전
부모
커밋
87143bba34
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/components/molecules/Dropdown/Dropdown.jsx

+ 1 - 1
src/components/molecules/Dropdown/Dropdown.jsx

@@ -158,7 +158,7 @@ class Dropdown extends React.Component {
       this.tipRef.style.display = 'block'
     }
 
-    this.listRef.style.top = `${listTop}px`
+    this.listRef.style.top = `${listTop + window.pageYOffset}px`
     this.listRef.style.left = `${this.buttonRect.left}px`
   }