fix(rn): 修正因为 android 占位符居中问题引起的软键盘右下角按钮行为异常的问题 (#2422)#2452
Open
dos1in wants to merge 1 commit intodidi:masterfrom
Open
fix(rn): 修正因为 android 占位符居中问题引起的软键盘右下角按钮行为异常的问题 (#2422)#2452dos1in wants to merge 1 commit intodidi:masterfrom
dos1in wants to merge 1 commit intodidi:masterfrom
Conversation
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.
(fix(input): 修复 android 下光标位置错误的问题 #2422) 通过将单行 input 的 multiline 设为 true 来修复 Android 光标问题但未同步修正依赖 multiline 的两处业务逻辑,导致软键盘发送按钮变成换行键:
本次改动为:将 submitBehavior(原 blurOnSubmit):加入 needMultilineFix 排除,确保假多行走单行逻辑
enterKeyHint:同上,假多行场景仍正常传入 confirmType。
收窄 needMultilineFix 触发条件
原条件对所有 Android 单行 input 生效,范围过宽。根据原始 issue 的复现条件收窄为:
只在真正会触发光标 bug 的场景(Android + 有 placeholder + textAlign center)下才启用 multiline hack。
调整属性传参
根据RN 0.77文档 替换 blurOnSubmit 为 submitBehavior。