Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(editor): wrong deactive logic (#11361)

Saul-Mironebed02f2520b4
diff --git a/blocksuite/framework/std/src/event/dispatcher.ts b/blocksuite/framework/std/src/event/dispatcher.ts
index a52fd7c4d4..1a1ba2fce6 100644
--- a/blocksuite/framework/std/src/event/dispatcher.ts
+++ b/blocksuite/framework/std/src/event/dispatcher.ts
@@ -170,7 +170,7 @@ export class UIEventDispatcher extends LifeCycleWatcher {
this.disposables.addFromEvent(this.host, 'focusin', () => {
this._setActive(true);
});
- this.disposables.addFromEvent(this.host, 'focusout', e => {
+ this.disposables.addFromEvent(document, 'focusout', e => {
if (e.relatedTarget && !this.host.contains(e.relatedTarget as Node)) {
this._setActive(false);
}