TextField's editable property doesn't behave as expected

未关闭
#6,899 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
ios, typescript

调研方向

阅读 tns-core-modules/ui/text-field/text-field.ios.ts 第 168 行附近的代码,然后在 iOS 上使用关联的 Playground 重现恢复并点击的操作序列。比较正常加载期间和应用恢复时的可编辑行为;完成标准是不可编辑的 TextField 在这两种状态下都无法被修改。

由索引模型根据 Issue 内容生成。

描述

backlog bug

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: 5.1
  • Cross-platform modules: 5.1
  • Android Runtime: 5.1
  • iOS Runtime: 5.1
  • Plugin(s): 5.1

Describe the bug
I have a TextField with editable set to false. However if I tap quickly on the field while the app is resuming, I can change the text.

To Reproduce
Run this playground on iOS. Tap on any of the fields. Keyboard doesn't show (as expected). Minimise the app and then get back to it. Don't wait for it to fully load, tap quickly on some of the fields. You can now change the text.

Expected behavior
You should not be able to change the text.

Sample project
Here is the sample playground

Additional context
I believe the nativeView's delegate should be updated in initNativeView/disposeNativeView instead of in onLoaded/onUnloaded as it is now.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

主要语言
TypeScript
星标
25.7k
派生
1.7k
平均合并
1 天 5 小时
30 天内合并 PR
35

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NativeScript/NativeScript 的其他 Issue

查看 NativeScript/NativeScript 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。