Browse Source

Fix dropdown's list position when page is scrolled

Fixes an issue where dropdown list would appear as if the page was not
scrolled, even though the page was.
Sergiu Miclea 8 years ago
parent
commit
57319c9282
1 changed files with 1 additions and 1 deletions
  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`
   }