Repository navigation
fix(settings): 设置页焦点误入菜单不再切页,输入框聚焦不再抢输入法 - #102
Merged
Merged
Conversation
- 菜单项只有在焦点本来就在菜单内时才按焦点切换分类;从右侧内容区按左/返回误入菜单时,把焦点拉回当前选中项,不再跳到别的分类页 - 抽出 settingsMenuFocusAction 并补单测覆盖四种情形 - TvTextField 聚焦不再自动弹输入法,按 OK 才弹出:避免整屏被键盘盖住、后续方向键被输入法吃掉
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
- 菜单项不再"获得焦点就切分类":焦点只负责高亮,页面只在按确定时切换,避免任何焦点漂移导致整页跳转 - 提示文案改为"按上下选择分类,按确定打开,向右进入设置"(zh/en/zh-TW/zh-HK) - 应用更新的「检查更新」在检查期间保持可聚焦(显示"处理中"),不再因为 enabled=false 丢焦点掉进菜单
TvButton 之前把 enabled 直接交给 Material Button:一旦按钮变灰就不可聚焦, 焦点立刻掉到最近的其它可聚焦元素(设置页里就是左侧菜单), 下一个方向键就被当成"切换分类",整页跟着跳。 现在 Button 始终可聚焦,点击由 enabled 守卫拦下;不可用但仍聚焦时画白框。 一处改动覆盖全应用所有 TvButton(检查更新、保存、扫描、上报等)。
ModerRAS
force-pushed
the
fix/settings-focus-jump
branch
from
November 18, 2026 05:28
3bd1506 to
85afaaf
Compare
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.
现象
设置页(以及其它用到 TvButton 的页面)点一下红按钮,经常整页跳到别的分类,或者焦点被甩走。真机复现(HK1):在「更新」里点「检查更新」,按钮变灰的瞬间焦点掉进左侧菜单;检查完成后按一下方向键,整页跳到「元数据」。
根因(两层)
enabled直接交给 Material Button:按钮一旦变灰就不可聚焦,焦点被甩到最近的其它可聚焦元素(设置页里就是左侧菜单)。改动
enabled守卫拦下;不可用但仍聚焦时画白框。一处改动覆盖全应用所有 TvButton(检查更新、保存、扫描、上报……)。TvTextField聚焦时不弹输入法,按 OK 才弹。settingsMenuFocusAction纯函数并补 4 条单测。验证(HK1 真机)
:ui-tv:testDebugUnitTest、:core:model:test全绿。