From 03c6095a3a1de6fa115eb17ffffb0aeedc58ccbf Mon Sep 17 00:00:00 2001 From: Wjavan <219539974+Wjavan@users.noreply.github.com> Date: Sat, 14 Nov 2026 13:26:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9F=8E=E9=80=9A=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E7=BD=91=E7=9B=98=E9=9D=A2=E6=9D=BF=E5=BC=80=E8=BF=87=E4=B9=8B?= =?UTF-8?q?=E5=90=8E=E6=8C=89=E9=92=AE=E4=B8=8D=E5=86=8D=E8=A1=A5=E6=8C=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 面板打开时 SweetAlert2 会给 body 直接子级加 aria-hidden,把整页当成对 读屏隐藏。找上传按钮时把这层也当成真隐藏,工具栏重排后就永远找不到 锚点,按钮消失且只能刷新恢复。 判据只放过 body 直接子级那层 aria-hidden,嵌套的照旧算隐藏。 --- ...276\344\270\213\350\275\275\345\212\251\346\211\213.user.js" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/\347\275\221\347\233\230\347\233\264\351\223\276\344\270\213\350\275\275\345\212\251\346\211\213.user.js" "b/\347\275\221\347\233\230\347\233\264\351\223\276\344\270\213\350\275\275\345\212\251\346\211\213.user.js" index 5eb2a0b..6fe117e 100644 --- "a/\347\275\221\347\233\230\347\233\264\351\223\276\344\270\213\350\275\275\345\212\251\346\211\213.user.js" +++ "b/\347\275\221\347\233\230\347\233\264\351\223\276\344\270\213\350\275\275\345\212\251\346\211\213.user.js" @@ -4255,7 +4255,7 @@ _uploadBtn() { let $hit = $('button, a, [role="button"], [class*=btn]').filter(function () { if (this.hidden || /none/i.test(String(this.style && this.style.display))) return false; - if ($(this).closest('[hidden], [aria-hidden="true"]').length) return false; + if ($(this).closest('[hidden], [aria-hidden="true"]:not(body > *)').length) return false; if ($(this).find('button, a, [role="button"]').length) return false; return /^(上传|上传文件|Upload)$/i.test($(this).text().replace(/\s+/g, '')); }).first();