Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BrnStepInputFormItem 手动输入时输入位置错误 #235

Closed
Elenring opened this issue Jun 7, 2022 · 2 comments
Closed

BrnStepInputFormItem 手动输入时输入位置错误 #235

Elenring opened this issue Jun 7, 2022 · 2 comments

Comments

@Elenring
Copy link

Elenring commented Jun 7, 2022

问题提交

[BUG]: BrnStepInputFormItem 手动输入时输入位置错误

内容需包含:

1、BUG 描述
BrnStepInputFormItem 手动输入时输入位置错误

2、复现步骤

  • 手动输入数字,每次改变值光标位置就会变化,导致输入值位置错误
  • 删除时每次值变化,都会导致无法继续删除(就像失去焦点一样,但是光标还在),除非再次点击输入框才可继续删除

3、图片展示
08FE0E4A63F5DFFE2A099744F3A65761

@jixiaoyong
Copy link
Contributor

这个光标位置错误是RangeLimitedTextInputFormatter.formatEditUpdate方法返回了错误的TextSelection导致的。

image

如果官方没有人安排修复的话,我待会儿提个pull request,修复这个问题。

但是对于下面这种文本清空之后的光标显示不确定应该怎么处理:隐藏光标,还是加入一个空白字符占位,或者不处理?

image

@Elenring
Copy link
Author

这个光标位置错误是RangeLimitedTextInputFormatter.formatEditUpdate方法返回了错误的TextSelection导致的。

image

如果官方没有人安排修复的话,我待会儿提个pull request,修复这个问题。

但是对于下面这种文本清空之后的光标显示不确定应该怎么处理:隐藏光标,还是加入一个空白字符占位,或者不处理?

image

十分感谢你的解答回复,根据你说的,问题解决了

violinday added a commit that referenced this issue Jul 8, 2022
* 3.x:
  update chnagelist and sync documents (#270)
  fix: 修复 BrnDialog  ThemeData 不生效的问题 (#262)
  perf: 删除未使用的 Provider 库依赖 (#258)
  fix: 修复 BrnSmallOutlineButton fontWeight 不生效的 bug. (#256)
  perf: 优化 BrnDatePicker 组件文档 (#257)
  perf: 优化完善 BrnProgressBarChart  组件文档 (#253)
  feat: BrnCalendarView 时间范围选择支持选择同一天。 (#251)
  fix: 修复 BrnBigMainButton 圆角、fontSize 通过主题配置不生效的问题。 (#252)
  fix: upgrade photo_view version to 0.14.0 (#254)
  perf: 优化 BrnCommonCardTitle 组件文档,图片与示例代码保持一致 (#255)
  BrnAddLabel support theme config (#250)
  BrnSmallOutlineButton使lineColor生效 (#244)
  form add attribute backgroundColor and support theme config (#246)
  fix: 修复BrnStepInputFormItem更新值时设置非法的TextSelection导致光标错位的问题 Fixes #235 (#239)
  fix #212 (#219)
  fix: warning in flutter3.0 (#232)
  update some docs (#210)
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

No branches or pull requests

2 participants