Compare commits
1 Commits
v13.0.0-34
...
v13.0.0-33
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9be53b990d |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "yjs",
|
||||
"version": "13.0.0-34",
|
||||
"version": "13.0.0-33",
|
||||
"description": "A framework for real-time p2p shared editing on any data",
|
||||
"main": "./y.node.js",
|
||||
"browser": "./y.js",
|
||||
|
||||
@@ -46,25 +46,17 @@ export function afterTransactionSelectionFixer (y, transaction, remote) {
|
||||
if (from !== null) {
|
||||
let sel = fromRelativePosition(fromY, from)
|
||||
if (sel !== null) {
|
||||
let node = sel.type.getDom()
|
||||
let offset = sel.offset
|
||||
if (node !== anchorNode || offset !== anchorOffset) {
|
||||
anchorNode = node
|
||||
anchorOffset = offset
|
||||
shouldUpdate = true
|
||||
}
|
||||
shouldUpdate = true
|
||||
anchorNode = sel.type.getDom()
|
||||
anchorOffset = sel.offset
|
||||
}
|
||||
}
|
||||
if (to !== null) {
|
||||
let sel = fromRelativePosition(toY, to)
|
||||
if (sel !== null) {
|
||||
let node = sel.type.getDom()
|
||||
let offset = sel.offset
|
||||
if (node !== focusNode || offset !== focusOffset) {
|
||||
focusNode = node
|
||||
focusOffset = offset
|
||||
shouldUpdate = true
|
||||
}
|
||||
focusNode = sel.type.getDom()
|
||||
focusOffset = sel.offset
|
||||
shouldUpdate = true
|
||||
}
|
||||
}
|
||||
if (shouldUpdate) {
|
||||
|
||||
22
y.node.js
22
y.node.js
@@ -1,7 +1,7 @@
|
||||
|
||||
/**
|
||||
* yjs - A framework for real-time p2p shared editing on any data
|
||||
* @version v13.0.0-34
|
||||
* @version v13.0.0-33
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
@@ -2995,25 +2995,17 @@ function afterTransactionSelectionFixer (y, transaction, remote) {
|
||||
if (from !== null) {
|
||||
let sel = fromRelativePosition(fromY, from);
|
||||
if (sel !== null) {
|
||||
let node = sel.type.getDom();
|
||||
let offset = sel.offset;
|
||||
if (node !== anchorNode || offset !== anchorOffset) {
|
||||
anchorNode = node;
|
||||
anchorOffset = offset;
|
||||
shouldUpdate = true;
|
||||
}
|
||||
shouldUpdate = true;
|
||||
anchorNode = sel.type.getDom();
|
||||
anchorOffset = sel.offset;
|
||||
}
|
||||
}
|
||||
if (to !== null) {
|
||||
let sel = fromRelativePosition(toY, to);
|
||||
if (sel !== null) {
|
||||
let node = sel.type.getDom();
|
||||
let offset = sel.offset;
|
||||
if (node !== focusNode || offset !== focusOffset) {
|
||||
focusNode = node;
|
||||
focusOffset = offset;
|
||||
shouldUpdate = true;
|
||||
}
|
||||
focusNode = sel.type.getDom();
|
||||
focusOffset = sel.offset;
|
||||
shouldUpdate = true;
|
||||
}
|
||||
}
|
||||
if (shouldUpdate) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user