y-prosemirror
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -333,3 +333,3 @@ 'use strict'; | ||
tr = tr.setMeta(ySyncPluginKey, { isChangeOrigin: true }); | ||
if (this.beforeTransactionSelection !== null) { | ||
if (this.beforeTransactionSelection !== null && this.prosemirrorView.hasFocus()) { | ||
tr.scrollIntoView(); | ||
@@ -803,5 +803,4 @@ } | ||
destroy: () => { | ||
const y = ySyncPluginKey.getState(view.state).doc; | ||
y.setAwarenessField('cursor', null); | ||
y.off('change', awarenessListener); | ||
awareness.setLocalStateField('cursor', null); | ||
awareness.off('change', awarenessListener); | ||
} | ||
@@ -808,0 +807,0 @@ } |
{ | ||
"name": "y-prosemirror", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Prosemirror bindings for Yjs", | ||
@@ -5,0 +5,0 @@ "main": "./dist/y-prosemirror.js", |
# y-prosemirror | ||
> [ProseMirror](http://prosemirror.net/) Binding for [Yjs](https://github.com/y-js/yjs) - [Demo](https://yjs-demos.now.sh/prosemirror/) | ||
@@ -6,3 +7,3 @@ | ||
### Features | ||
## Features | ||
@@ -45,2 +46,2 @@ * Sync ProseMirror state | ||
[The MIT License](./LICENSE) © Kevin Jahns | ||
[The MIT License](./LICENSE) © Kevin Jahns |
@@ -105,5 +105,4 @@ | ||
destroy: () => { | ||
const y = ySyncPluginKey.getState(view.state).doc | ||
y.setAwarenessField('cursor', null) | ||
y.off('change', awarenessListener) | ||
awareness.setLocalStateField('cursor', null) | ||
awareness.off('change', awarenessListener) | ||
} | ||
@@ -110,0 +109,0 @@ } |
@@ -198,3 +198,3 @@ /** | ||
tr = tr.setMeta(ySyncPluginKey, { isChangeOrigin: true }) | ||
if (this.beforeTransactionSelection !== null) { | ||
if (this.beforeTransactionSelection !== null && this.prosemirrorView.hasFocus()) { | ||
tr.scrollIntoView() | ||
@@ -201,0 +201,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2332617
20957
46