Skip to content

Commit

Permalink
починил по мелочи
Browse files Browse the repository at this point in the history
  • Loading branch information
veglem committed May 7, 2024
1 parent 5e240f7 commit b706520
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/src/components/Editor/Plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -841,14 +841,14 @@ export const fromJson = (props: PluginProps) => {
if (props[`cursor${AppUserStore.state.username}`] === '0') {
setTimeout(() => {
setCursorAtNodePosition(node, 0);
(node as HTMLElement).focus();
(node as HTMLElement).click();
// document.getSelection().setPosition(node, 0);
})

} else {
setTimeout(() => {
setCursorAtNodePosition(node, Number(props[`cursor${AppUserStore.state.username}`]));
(node as HTMLElement).focus();
(node as HTMLElement).click();
// document.getSelection().setPosition(node.firstChild, Number(props[`cursor${AppUserStore.state.username}`]));
})

Expand Down

0 comments on commit b706520

Please sign in to comment.