mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
scroll if trying to navigate up to out of screen
This commit is contained in:
@@ -36,6 +36,7 @@ module.exports = React.createClass({
|
|||||||
bindKey: {mac: 'Ctrl-P'},
|
bindKey: {mac: 'Ctrl-P'},
|
||||||
exec: function (editor) {
|
exec: function (editor) {
|
||||||
editor.navigateUp(1)
|
editor.navigateUp(1)
|
||||||
|
if (editor.getCursorPosition().row < editor.getFirstVisibleRow()) editor.scrollToLine(editor.getCursorPosition().row, false, false)
|
||||||
},
|
},
|
||||||
readOnly: true
|
readOnly: true
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user