Polish mobile caption properties

This commit is contained in:
haixin.yang committed 2026-07-22 11:09:14 +08:00
1 parent b1ca648e79
commit c48e1f15cc
3 files changed
+62 -1

No files matched your search

+2 -1
View File
@@ -13,7 +13,8 @@ export function EditorSidebar({ model: d }) {
onClick={() => {
d.selectTool(id);
if (window.matchMedia?.("(max-width: 760px)").matches) {
d.setMobilePanel?.(d.mobilePanel === "tools" && d.activeTool === id ? "" : "tools");
const defaultPanel = id === "caption" ? "inspector" : "tools";
d.setMobilePanel?.(d.mobilePanel === defaultPanel && d.activeTool === id ? "" : defaultPanel);
}
}}
>