                 cur = elt.find("##{@props.cur_id}")
                 if cur.length > 0
                     top = cur.position().top - elt.position().top
-                    if top < 0
+                    if top < PADDING
                         scroll = 'cell top'
-                    else if top > elt.height()
+                    else if top > elt.height() - PADDING
                         scroll = 'cell bottom'
                     else
                         return

{Cell} = require('./cell')

keyboard       = require('./keyboard')

exports.CellList = rclass
    propTypes:

            <div style={cells_style}>
                {v}
            </div>
            <div style={minHeight: '100px'}>
            </div>
        </div>