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(electron): whitescreen issue (#7742)

pengx17a03831f2a2f0
diff --git a/packages/frontend/electron/renderer/global.css b/packages/frontend/electron/renderer/global.css
index 30fff067cb..89a08a6758 100644
--- a/packages/frontend/electron/renderer/global.css
+++ b/packages/frontend/electron/renderer/global.css
@@ -14,6 +14,10 @@ html {
opacity: 0;
}
+html[data-active='true'] {
+ opacity: 1;
+}
+
html:is([data-active='false'], [data-dragging='true']) * {
-webkit-app-region: no-drag !important;
}
diff --git a/packages/frontend/electron/src/main/windows-manager/tab-views.ts b/packages/frontend/electron/src/main/windows-manager/tab-views.ts
index 4b997a52b8..9e92770ef4 100644
--- a/packages/frontend/electron/src/main/windows-manager/tab-views.ts
+++ b/packages/frontend/electron/src/main/windows-manager/tab-views.ts
@@ -316,7 +316,7 @@ export class WebContentViewsManager {
};
closeTab = async (id?: string) => {
- if (!id) {
+ if (!id && !this.activeWorkbenchMeta?.pinned) {
id = this.activeWorkbenchId;
}