mirror of
https://github.com/cudr/slate-collaborative.git
synced 2026-03-02 03:40:18 +00:00
feat: success garbage cursor
This commit is contained in:
@@ -21,7 +21,9 @@ const setSelection = (doc, op, { id, selection, annotationType }) => {
|
||||
if (focus) cursor.focus = focus
|
||||
if (anchor) cursor.anchor = anchor
|
||||
|
||||
const cursorPath = (anchor && anchor.path) || (focus && focus.path)
|
||||
const cursorPath = cursor.data.isBackward
|
||||
? anchor && anchor.path
|
||||
: focus && focus.path
|
||||
|
||||
if (cursorPath) cursor.data.cursorPath = toJS(cursorPath)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user