NativeScript / NativeScript/angular
Reactive Forms/FormControl Have Incorrect Values When Using iOS QuickPath/Slide to Type
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 55
- 派生
- 13
- 平均合并
- 16 分钟
- 30 天内合并 PR
- 1
描述
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
- CLI: 8.2.3
- Cross-platform modules: 8.1.1
- Android Runtime: 8.1.1
- iOS Runtime: 8.2.1
- Plugin(s): iqkeyboardmanager (2.0.0)
- NativeScript-Angular: 12.2.0
- Angular: 12.2.13
Describe the bug
When using swipe to type/QuickPath on an iOS keyboard in a reactive form, the word input with QuickPath temporarily replaces the value of the control with just that word instead of appending to the control's previous value. Another input into the keyboard subsequently returns the value back to the full expected value.
To Reproduce
- Have a
TextFieldbound to aFormControlwith theformControlattribute. - Subscribe to the control's
valueChangedevent and output the value each time the value changes. - Start inputting a word into the text field, then add a space, for example, "Test ".
- Now use QuickPath/slide to type to input another word, like "test" again.
- The last output you see will be "test" instead of "Test test".
- Input a space, the output will return to the full value of the control.
Expected behavior
When using slide to type/QuickPath, form controls should retain the full value of those controls and emit those values as usual to valueChanged.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
按照列出的 QuickPath 步骤,使用绑定到 Angular FormControl 的 iOS TextField 重现该问题,并订阅其 valueChanged 事件。跟踪 TextField 的值传播到表单控件的位置,并验证在滑动输入期间以及随后输入空格后,会发出完整的值,例如“Test test,”。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, ios, typescript
- 领域
- mobile
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100