🐛 Fix getActiveEditor function returning inactive editor (#16679)

This commit is contained in:
Jeffrey Chen 2025-12-24 11:08:56 +08:00 committed by GitHub
parent bdfc23a345
commit 25b6b9f679
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -229,7 +229,7 @@ const getActiveEditor = (wndActive = true) => {
}
if (!editor) {
editor = allEditor.find(item => {
if (hasClosestByClassName(item.protyle.element, "layout__wnd--active", true)) {
if (!item.protyle.element.classList.contains("fn__none") && hasClosestByClassName(item.protyle.element, "layout__wnd--active", true)) {
return true;
}
});