Codemirror 6: Detect blur/remove all selections

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) {

Is there any way to detect when all selections have been removed from an editor?

Selections are never removed from the editor. Even when unfocused, it remembers its selection position. You may want to listen to the DOM "blur" event (via domEventHandlers).

Ahhh. That clears up a lot. Thanks!