Reactive Forms/FormControl Have Incorrect Values When Using iOS QuickPath/Slide to Type

未關閉
#76 0 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
48/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
angular, ios, typescript
領域
mobile

研究方向

按照列出的 QuickPath 步驟,使用繫結至 Angular FormControl 的 iOS TextField 重現問題,並訂閱其 valueChanged 事件。追蹤 TextField 值傳播至表單控制項的位置,並確認在滑動輸入期間以及接續的空格之後,會發出完整的值,例如「Test test,」。

由索引模型根據 Issue 內容生成。

描述

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

  1. Have a TextField bound to a FormControl with the formControl attribute.
  2. Subscribe to the control's valueChanged event and output the value each time the value changes.
  3. Start inputting a word into the text field, then add a space, for example, "Test ".
  4. Now use QuickPath/slide to type to input another word, like "test" again.
  5. The last output you see will be "test" instead of "Test test".
  6. 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.

主要語言
TypeScript
星號
55
分支
13
平均合併
16 分鐘
30 天內合併 PR
1

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

NativeScript/angular 的其他 Issue

查看 NativeScript/angular 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。