prosemirror-collab
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -0,1 +1,7 @@ | ||
## 1.1.2 (2019-05-29) | ||
### Bug fixes | ||
Fix an issue where in `mapSelectionBackward` mode, the plugin flipped the head and anchor of the selection, leading to selection glitches during collaborative editing. | ||
## 1.1.1 (2018-10-09) | ||
@@ -2,0 +8,0 @@ |
@@ -148,4 +148,4 @@ 'use strict'; | ||
if (options && options.mapSelectionBackward && state.selection instanceof prosemirrorState.TextSelection) { | ||
tr.setSelection(prosemirrorState.TextSelection.between(tr.doc.resolve(tr.mapping.map(state.selection.head, -1)), | ||
tr.doc.resolve(tr.mapping.map(state.selection.anchor, -1)), -1)); | ||
tr.setSelection(prosemirrorState.TextSelection.between(tr.doc.resolve(tr.mapping.map(state.selection.anchor, -1)), | ||
tr.doc.resolve(tr.mapping.map(state.selection.head, -1)), -1)); | ||
tr.updated &= ~1; | ||
@@ -152,0 +152,0 @@ } |
{ | ||
"name": "prosemirror-collab", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Collaborative editing for ProseMirror", | ||
@@ -5,0 +5,0 @@ "main": "dist/collab.js", |
@@ -146,4 +146,4 @@ import {Plugin, PluginKey, TextSelection} from "prosemirror-state" | ||
if (options && options.mapSelectionBackward && state.selection instanceof TextSelection) { | ||
tr.setSelection(TextSelection.between(tr.doc.resolve(tr.mapping.map(state.selection.head, -1)), | ||
tr.doc.resolve(tr.mapping.map(state.selection.anchor, -1)), -1)) | ||
tr.setSelection(TextSelection.between(tr.doc.resolve(tr.mapping.map(state.selection.anchor, -1)), | ||
tr.doc.resolve(tr.mapping.map(state.selection.head, -1)), -1)) | ||
tr.updated &= ~1 | ||
@@ -150,0 +150,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35841