diff --git a/IPython/html/static/notebook/js/textcell.js b/IPython/html/static/notebook/js/textcell.js index 4eab761..038dee4 100644 --- a/IPython/html/static/notebook/js/textcell.js +++ b/IPython/html/static/notebook/js/textcell.js @@ -251,7 +251,8 @@ var IPython = (function (IPython) { return true; } else { var cursor = this.code_mirror.getCursor(); - if (cursor.line === 0 && cursor.ch === 0) { + if (cursor.line === 0 && cm.findPosV(cm.getCursor(), -1, 'line', cm.charCoords(cm.getCursor(),'div').left).hitSide) { + console.log('at top'); return true; } else { return false;