Forráskód Böngészése

Merge pull request #141 from smiclea/fix-dropdown

Fix dropdown's list position when page is scrolled
Dorin Paslaru 8 éve
szülő
commit
87143bba34
1 módosított fájl, 1 hozzáadás és 1 törlés
  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.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`
     this.listRef.style.left = `${this.buttonRect.left}px`
   }
   }