feat(editor): not sync selection from awareness (#11420)

This commit is contained in:
Saul-Mirone
2025-04-03 09:22:26 +00:00
parent 727c540fda
commit 773db7860a
2 changed files with 2 additions and 9 deletions

View File

@@ -59,15 +59,6 @@ export class StoreSelectionExtension extends StoreExtension {
const all = change.updated.concat(change.added).concat(change.removed);
const localClientID = this.store.awarenessStore.awareness.clientID;
const exceptLocal = all.filter(id => id !== localClientID);
const hasLocal = all.includes(localClientID);
if (hasLocal) {
const localSelectionJson =
this.store.awarenessStore.getLocalSelection(this._id);
const localSelection = localSelectionJson.map(json => {
return this._jsonToSelection(json);
});
this._selections.value = localSelection;
}
// Only consider remote selections from other clients
if (exceptLocal.length > 0) {
@@ -162,6 +153,7 @@ export class StoreSelectionExtension extends StoreExtension {
this._id,
selections.map(s => s.toJSON())
);
this._selections.value = selections;
this.slots.changed.next(selections);
}