1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-10 18:10:54 +09:00

JS-4192: fix

This commit is contained in:
Andrew Simachev 2024-08-13 07:58:26 +02:00
parent 7b9c62706f
commit caabff5a4b
No known key found for this signature in database
GPG key ID: 49A163D0D14E6FD8
2 changed files with 3 additions and 2 deletions

View file

@ -349,7 +349,8 @@ const EditorPage = observer(class EditorPage extends React.Component<Props, Stat
focus.set(block.id, { from, to });
focus.apply();
focus.scroll(isPopup, block.id);
window.setTimeout(() => focus.scroll(isPopup, block.id), 10);
};
unbind () {

View file

@ -99,7 +99,7 @@ class Focus {
const ch = container.height();
const no = node.offset().top;
const hh = J.Size.header;
const o = J.Size.lastBlock + hh;
const o = J.Size.lastBlock + ch / 2 + hh;
const st = container.scrollTop();
const y = isPopup ? (no - container.offset().top + st) : no;