Skip to content

Commit

Permalink
🐛 fix #6622
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Nov 16, 2022
1 parent cb58fb0 commit 06b4d8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/src/util/newFile.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {showMessage} from "../dialog/message";
import {getAllModels} from "../layout/getAll";
import {hasTopClosestByTag} from "../protyle/util/hasClosest";
import {hasClosestByClassName, hasTopClosestByTag} from "../protyle/util/hasClosest";
import {getDockByType} from "../layout/util";
/// #if !MOBILE
import {Files} from "../layout/dock/Files";
Expand All @@ -23,7 +23,7 @@ export const newFile = (notebookId?: string, currentPath?: string, open?: boolea
if (currentElement.classList.contains("item--focus")) {
notebookId = item.editor.protyle.notebookId;
currentPath = pathPosix().dirname(item.editor.protyle.path);
if (currentElement.parentElement.parentElement.classList.contains("layout__wnd--active")) {
if (hasClosestByClassName(currentElement, "layout__wnd--active")) {
return true;
}
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/util/onGetConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ const initBar = () => {
<div id="barSetting" class="toolbar__item b3-tooltips b3-tooltips__sw${window.siyuan.config.readonly ? " fn__none" : ""}" aria-label="${window.siyuan.languages.config} ${updateHotkeyTip(window.siyuan.config.keymap.general.config.custom)}">
<svg><use xlink:href="#iconSettings"></use></svg>
</div>
<div id="barHelp" class="toolbar__item b3-tooltips b3-tooltips__sw" aria-label="${window.siyuan.languages.openBy} ${window.siyuan.languages.help}">
<div id="barTopHelp" class="toolbar__item b3-tooltips b3-tooltips__sw" aria-label="${window.siyuan.languages.openBy} ${window.siyuan.languages.help}">
<svg><use xlink:href="#iconHelp"></use></svg>
</div>
<div class="fn__flex" id="windowControls"></div>`;
Expand Down Expand Up @@ -251,7 +251,7 @@ const initBar = () => {
openSetting();
event.stopPropagation();
break;
} else if (target.id === "barHelp") {
} else if (target.id === "barTopHelp") {
mountHelp();
event.stopPropagation();
break;
Expand Down

0 comments on commit 06b4d8e

Please sign in to comment.