From 79497a7e7943f2270fe25b3a035ac046a5bcd60f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaros=C5=82aw=20Sadzi=C5=84ski?= Date: Wed, 19 May 2021 13:56:31 +0200 Subject: [PATCH] (core) Editor position wasn't restored on a long list Summary: Editor position wasn't restored on a long list, where the rows haven't been shown yet (the scroll haven't happend yet). Test Plan: Browser tests Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D2823 --- app/client/components/GristDoc.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/client/components/GristDoc.ts b/app/client/components/GristDoc.ts index 827e04d9..36b5df60 100644 --- a/app/client/components/GristDoc.ts +++ b/app/client/components/GristDoc.ts @@ -654,6 +654,10 @@ export class GristDoc extends DisposableWithEvents { // TODO: column selection not working on card/detail view, or getting overridden - // look into it (not a high priority for now since feature not easily discoverable // in this view). + + // even though the cursor is at right place, the scroll could not have yet happened + // wait for a bit (scroll is done in a setTimeout 0) + await delay(0); } catch (e) { console.debug(`_recursiveMoveToCursorPos(${JSON.stringify(cursorPos)}): ${e}`); throw new UserError('There was a problem finding the desired cell.');