diff options
author | bobzel <zzzman@gmail.com> | 2022-06-06 14:32:18 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-06-06 14:32:18 -0400 |
commit | 42c7ca38a77ede7171f628346117da191bbf115d (patch) | |
tree | 4f07e26f7d99d9a1bbc0cb100a91be2db172074b /src/client/views/nodes/formattedText/FormattedTextBox.tsx | |
parent | 0838b590d78c6861bb6c3d83c93032a606806304 (diff) |
fixed scripting repl transformer error. fixed not being able to edit someone else's text in selfEdit mode
Diffstat (limited to 'src/client/views/nodes/formattedText/FormattedTextBox.tsx')
-rw-r--r-- | src/client/views/nodes/formattedText/FormattedTextBox.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index 7a500ac88..2ae9acfc8 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -1504,9 +1504,9 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp this._rules!.EnteringStyle = false; } e.stopPropagation(); - for (var i = state.selection.from; i < state.selection.to; i++) { + for (var i = state.selection.from; i <= state.selection.to; i++) { const node = state.doc.resolve(i); - if (node?.marks?.().some(mark => mark.type === schema.marks.user_mark && + if (state.doc.content.size - 1 > i && node?.marks?.().some(mark => mark.type === schema.marks.user_mark && mark.attrs.userid !== Doc.CurrentUserEmail) && [AclAugment, AclSelfEdit].includes(GetEffectiveAcl(this.rootDoc))) { e.preventDefault(); |