Vanessa 2024-08-09 22:14:32 +08:00
parent 49fd6070ea
commit d15865975f
2 changed files with 2 additions and 2 deletions

View file

@ -94,7 +94,7 @@ export abstract class Constants {
public static readonly CB_GET_ROOTSCROLL = "cb-get-rootscroll"; // 如果为 rootID 就滚动到指定位置,必有 rootID
public static readonly CB_GET_HTML = "cb-get-html"; // 直接渲染,不需要再 /api/block/getDocInfo否则搜索表格无法定位
public static readonly CB_GET_HISTORY = "cb-get-history"; // 历史渲染
public static readonly CB_GET_OPENNEW = "cb-get-opennew"; // 编辑器只读后新建文件需为临时解锁状态
public static readonly CB_GET_OPENNEW = "cb-get-opennew"; // 编辑器只读后新建文件需为临时解锁状态 & https://github.com/siyuan-note/siyuan/issues/12197
// localstorage
public static readonly LOCAL_ZOOM = "local-zoom";

View file

@ -282,7 +282,7 @@ export class Protyle {
private afterOnGet(mergedOptions: IOptions) {
if (this.protyle.model) {
/// #if !MOBILE
if (mergedOptions.action?.includes(Constants.CB_GET_FOCUS)) {
if (mergedOptions.action?.includes(Constants.CB_GET_FOCUS) || mergedOptions.action?.includes(Constants.CB_GET_OPENNEW)) {
setPanelFocus(this.protyle.model.element.parentElement.parentElement);
}
updatePanelByEditor({