Repository navigation
fix(console): 修复移动端批量导入无法选文件 - #397
Merged
Merged
Conversation
iOS Safari 会忽略对 display:none 的 file input 的 programmatic click(HeroUI onPress)。 改为 label + sr-only input,确认弹层适配小屏,并同步 embedded static。
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.
根因
账号页「批量导入」用 HeroUI
Button.onPress→hidden(display: none)file input 的click()。iOS Safari / 部分 WebView 会忽略对display:nonefile input 的 programmatic click,且 React Aria 的 press 路径也容易打断 user-gesture,所以移动端点了没反应。检测 / 确认 Modal / WorkBuddy 导入链路本身没问题,是触发选文件的 UI 模式坏了。
修复
label htmlFor+sr-onlyfile input(非display:none),点击即直接手势打开系统文件选择器;视觉仍用 HeroUI.button--sm.button--secondary;loading 时用已有BrandMark loadingw-full flex-wrap justify-end,避免按钮被挤出可视区scroll="inside"/ 长文件名break-allinternal/webui/static(避免 static CI dirty)detectImportBundle→BatchImportConfirmModal→importWorkbuddyBundle,无平行流程不做
不 merge、不发版、不部署 SGP3。
建议真机验收
残留风险
accept仍偏 JSON;极端 MIME 标记异常的文件可能被系统过滤(可再放宽)