mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-05 15:11:48 +01:00
This commit is contained in:
parent
02c7182856
commit
aef01e1148
1 changed files with 10 additions and 2 deletions
|
|
@ -552,8 +552,16 @@ export const globalShortcut = () => {
|
|||
event.stopPropagation();
|
||||
let activeTabElement = document.querySelector(".block__icons--active");
|
||||
if (activeTabElement && activeTabElement.getBoundingClientRect().width > 0) {
|
||||
const type = activeTabElement.parentElement.className.split("sy__")[1] as TDockType;
|
||||
getDockByType(type).toggleModel(type, false, true);
|
||||
let type: TDockType
|
||||
Array.from(activeTabElement.parentElement.classList).find(item => {
|
||||
if (item.startsWith("sy__")) {
|
||||
type = item.replace("sy__", "") as TDockType;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (type) {
|
||||
getDockByType(type).toggleModel(type, false, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
activeTabElement = document.querySelector(".layout__wnd--active .item--focus");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue