mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 10:16:26 +00:00
Debug: Finderから検索して結果が何もなくなってからFinder自体が働かなくなる
This commit is contained in:
@@ -13,6 +13,10 @@ module.exports = React.createClass({
|
|||||||
var el = React.findDOMNode(this)
|
var el = React.findDOMNode(this)
|
||||||
var li = el.querySelectorAll('li')[index]
|
var li = el.querySelectorAll('li')[index]
|
||||||
|
|
||||||
|
if (li == null) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
var overflowBelow = el.clientHeight + el.scrollTop < li.offsetTop + li.clientHeight
|
var overflowBelow = el.clientHeight + el.scrollTop < li.offsetTop + li.clientHeight
|
||||||
if (overflowBelow) {
|
if (overflowBelow) {
|
||||||
el.scrollTop = li.offsetTop + li.clientHeight - el.clientHeight
|
el.scrollTop = li.offsetTop + li.clientHeight - el.clientHeight
|
||||||
|
|||||||
Reference in New Issue
Block a user