]> git.immae.eu Git - github/fretlink/time-picker.git/commitdiff
fix relative scrollTop, #9
authorafc163 <afc163@gmail.com>
Fri, 11 Dec 2015 13:43:48 +0000 (21:43 +0800)
committerafc163 <afc163@gmail.com>
Fri, 11 Dec 2015 13:43:48 +0000 (21:43 +0800)
src/module/Select.jsx

index 8cf4e2d1485c1de1181b6430ca4a6fc5b6474cab..b24f20c2a923d5fea96ab316ef823ad783124c08 100644 (file)
@@ -67,7 +67,7 @@ const Select = React.createClass({
       index = 0;
     }
     const topOption = list.children[index];
-    const to = topOption.offsetTop - select.offsetTop;
+    const to = topOption.offsetTop;
     scrollTo(select, to, duration);
   },