Repository navigation
fix: 城通个人网盘开过面板后按钮不再补挂 - #63
Merged
Merged
Conversation
面板打开时 SweetAlert2 会给 body 直接子级加 aria-hidden,把整页当成对 读屏隐藏。找上传按钮时把这层也当成真隐藏,工具栏重排后就永远找不到 锚点,按钮消失且只能刷新恢复。 判据只放过 body 直接子级那层 aria-hidden,嵌套的照旧算隐藏。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
现象
城通个人网盘的文件页,打开过一次「下载助手」面板后把窗口拉窄(站点切到平板档,约 1150px 以下,贴边分屏就会触发),工具栏整块重画,注入的按钮被丢掉且不再补挂;拉回原宽度也不回来,只能刷新页面。
原因
SweetAlert2 打开模态时会给
document.body.children逐个加aria-hidden="true"。找宿主「上传」按钮时把这一层也当成了真隐藏,_uploadBtn()于是返回null,_mountDriveBtn()没有锚点,重排后插不回去。改动
判据只放过
body直接子级那层aria-hidden,嵌套的照旧算隐藏;[hidden]与其余筛子不动。只作用于城通个人网盘的挂载:分享页、目录页走
listenElement,其余六家不经过这段。验证
119.6×40、x280 y140、右间距 0)。harness/run_all.sh失败 0 项,ctfile_check全过,node --checkOK。@version未改,合并不会触发发版。