Skip to content

fix(rn): 修正因为 android 占位符居中问题引起的软键盘右下角按钮行为异常的问题 (#2422)#2452

Open
dos1in wants to merge 1 commit intodidi:masterfrom
dos1in:fix/input-confirm-type
Open

fix(rn): 修正因为 android 占位符居中问题引起的软键盘右下角按钮行为异常的问题 (#2422)#2452
dos1in wants to merge 1 commit intodidi:masterfrom
dos1in:fix/input-confirm-type

Conversation

@dos1in
Copy link
Member

@dos1in dos1in commented Mar 24, 2026

  1. (fix(input): 修复 android 下光标位置错误的问题 #2422) 通过将单行 input 的 multiline 设为 true 来修复 Android 光标问题但未同步修正依赖 multiline 的两处业务逻辑,导致软键盘发送按钮变成换行键:
    本次改动为:将 submitBehavior(原 blurOnSubmit):加入 needMultilineFix 排除,确保假多行走单行逻辑
    enterKeyHint:同上,假多行场景仍正常传入 confirmType。

  2. 收窄 needMultilineFix 触发条件
    原条件对所有 Android 单行 input 生效,范围过宽。根据原始 issue 的复现条件收窄为:
    只在真正会触发光标 bug 的场景(Android + 有 placeholder + textAlign center)下才启用 multiline hack。

  3. 调整属性传参
    根据RN 0.77文档 替换 blurOnSubmit 为 submitBehavior。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant