From acbc463d76c233f46550dc8f447a47c9e934c3dc Mon Sep 17 00:00:00 2001 From: Ran Luo Date: Fri, 26 Jun 2026 11:45:58 +0800 Subject: [PATCH 01/12] fix(muya): move preview toolbar to the block's top-right (#4733) (#4734) The HTML/math block preview toolbar was anchored at the top-left corner inside the block (placement `left-start` + `mainAxis: -95`), overlapping the rendered content. Mirror it to the top-right (`right-start`, same `-95` inset), where left-aligned content leaves the corner free. Co-authored-by: Claude Opus 4.8 (1M context) --- packages/muya/src/ui/previewToolBar/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/muya/src/ui/previewToolBar/index.ts b/packages/muya/src/ui/previewToolBar/index.ts index 8ab52b1c57..0bb402f615 100644 --- a/packages/muya/src/ui/previewToolBar/index.ts +++ b/packages/muya/src/ui/previewToolBar/index.ts @@ -12,7 +12,7 @@ import ICONS from './config'; import './index.css'; const defaultOptions = { - placement: 'left-start' as const, + placement: 'right-start' as const, offsetOptions: { mainAxis: -95, crossAxis: 5, From 6fd3ee6b5070217644a399b5da7f904ac93ac46a Mon Sep 17 00:00:00 2001 From: Ran Luo Date: Fri, 26 Jun 2026 11:50:42 +0800 Subject: [PATCH 02/12] fix(renderer): hide muya float tools in source-code mode (#4732) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In source mode the muya editor is sent behind the source editor via `z-index: -1` but stays in the DOM. Several muya float tools listen on a document-level mousemove and locate the hovered block with `document.elementsFromPoint`, which ignores z-index — so hovering over the source editor re-triggered the paragraph front button/menu, the table drag/column toolbars and the preview toolbar on top of CodeMirror. Add `pointer-events: none` to `.editor-wrapper.source` so the hidden editor subtree is excluded from hit-testing; the floats can no longer be re-triggered, while CodeMirror (a sibling, not a descendant) stays interactive. Fixes #4731 Co-authored-by: Claude Opus 4.8 (1M context) --- .../src/renderer/src/components/editorWithTabs/editor.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/desktop/src/renderer/src/components/editorWithTabs/editor.vue b/packages/desktop/src/renderer/src/components/editorWithTabs/editor.vue index 88434680dd..8d2d8ca244 100644 --- a/packages/desktop/src/renderer/src/components/editorWithTabs/editor.vue +++ b/packages/desktop/src/renderer/src/components/editorWithTabs/editor.vue @@ -2028,6 +2028,11 @@ onBeforeUnmount(() => { top: 0; left: 0; overflow: hidden; + /* `z-index: -1` only hides the editor visually; `document.elementsFromPoint` + ignores stacking, so muya's mousemove-driven float tools (front button/menu, + table drag/column toolbars, preview toolbar) still re-trigger over the source + editor. Drop the subtree from hit-testing too so they cannot (#4731). */ + pointer-events: none; } .editor-component { From 68f4b43171f7a27bad690da1ef757e7b418dc1f9 Mon Sep 17 00:00:00 2001 From: Ran Luo Date: Fri, 26 Jun 2026 12:47:49 +0800 Subject: [PATCH 03/12] fix(desktop): hide the in-app title bar under the native title bar style (#4210) (#4630) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the native title bar (non-macOS, `frame: true`), the OS draws a title bar showing document.title while the in-app custom title bar rendered the same filename — the title appeared twice. The in-app `` was mounted unconditionally. Gate the in-app title bar DOM behind `shouldShowInAppTitleBar(titleBarStyle, isOsx)` (hidden when `native` and not macOS; macOS windows are always frameless so it still shows). The `document.title` watcher stays in `