Improve local filetree view state and sidebar performance

This commit is contained in:
lix-2026
2026-05-27 11:31:12 +08:00
parent 58e2fdb5d8
commit 3ae33cc21d
56 changed files with 8614 additions and 461 deletions
@@ -5,6 +5,7 @@ export const createSidebarAttachmentOpenRuntime = (dependencies = {}) => {
buildLocalOnlyOfficeOpenUrl,
buildOnlyOfficeOpenPath,
buildOnlyOfficeOpenUrl,
closestAction: injectedClosestAction,
currentDocumentId,
currentRootUri,
currentWorkspaceSourcePayload,
@@ -23,6 +24,11 @@ export const createSidebarAttachmentOpenRuntime = (dependencies = {}) => {
uploadedFileSize,
} = dependencies;
const closestAction = typeof injectedClosestAction === 'function' ? injectedClosestAction : function(target, selector) {
var node = target && target.nodeType === Node.TEXT_NODE ? target.parentElement : target;
return node && typeof node.closest === 'function' ? node.closest(selector) : null;
};
var activeEditorAttachmentLink = null;
var attachmentActionsHideTimer = 0;