The code below logs “update” to the console twice when I click into an editor, but 0 times when I click away.
const fakePlugin = ViewPlugin.fromClass(
class {
constructor(view) {
this.decorations = Decoration.set([]);
}
update(update) {
console.log('update');
}
}
).decorations();
Is there any way to detect when all selections have been removed from an editor?