(core) Restoring cursor position on raw data views

Summary:
This diff introduces cursor features for raw data views:
- Restoring cursor position when the browser window is reloaded
- Restoring the last edit position when the browser window is reloaded

Test Plan: Added tests

Reviewers: alexmojaki

Reviewed By: alexmojaki

Subscribers: jarek

Differential Revision: https://phab.getgrist.com/D3314
This commit is contained in:
Jarosław Sadziński
2022-03-22 13:38:56 +01:00
parent 3b76b33423
commit 96a34122a5
6 changed files with 137 additions and 67 deletions

View File

@@ -236,6 +236,9 @@ BaseView.commonCommands = {
* loading.
*/
BaseView.prototype.setCursorPos = function(cursorPos) {
if (this.isDisposed()) {
return;
}
if (!this._isLoading.peek()) {
this.cursor.setCursorPos(cursorPos);
} else {