From b927b9ec7cea49a04760339f058f493e5c7a700c Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 27 Oct 2026 12:47:49 +0800 Subject: [PATCH] fix(ticket): keep file picker out of modal shell to stop dialog offset The hidden file input was appended to the flex-centered modal shell, becoming a second flex child that pushed the dialog left and exposed the native file button (theme display rules override [hidden]). Co-Authored-By: Claude Fable 5 --- assets/js/ticket-center-core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/ticket-center-core.js b/assets/js/ticket-center-core.js index 8c1efe85..46dba94a 100644 --- a/assets/js/ticket-center-core.js +++ b/assets/js/ticket-center-core.js @@ -276,12 +276,12 @@ */ function bindShell(shell, onClick) { var ctx = { uploadRoot: null }; + // 文件选择器保持脱离文档:shell 是 flex 居中容器,挂进去会成为第二个 flex 子项, + // 把对话框挤偏并露出原生「选择文件」按钮(主题样式会覆盖 [hidden])。 var input = document.createElement('input'); input.type = 'file'; input.accept = IMAGE_ACCEPT; input.multiple = true; - input.hidden = true; - shell.appendChild(input); input.addEventListener('change', function () { var files = Array.prototype.slice.call(input.files || []); input.value = '';