-
Notifications
You must be signed in to change notification settings - Fork 238
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
inputItem 更新完重叠之后 中文输入 onchange 事件不触发 #291
Comments
进入焦点和移出焦点 应该用 onFocus 事件 |
这个我知道 |
我试了一下 输入内容时 onChange 事件会实时触发的 |
|
我更新版本试一下 |
<InputItem [clear]="true" 你这样试一下? |
试了,没毛病啊 |
我用0.11.2那个版本也是没问题的 可是升级到了0.11.4+ 就有问题 |
我用最新版本试了是正常的, 我不是官方的…… |
我angular/cil 版本是 7.1.0的 这个有关系吗? |
源代码有问题和ng版本无关 |
不应该吧 在0.11.2版本同样的代码都没问题 |
你去看下源码就知道了,当时为了解决ios中文输入的问题,导致了这个问题,不过不同浏览器反应不同,主要还是因为compositionStart compositionEnd 和ngmodelchange触发时机导致的 |
在使用使用iOS真机测试,以及Chrome模拟手机中。 |
是的,当时为了解决ios中文输入时内容重复输入增加了compositionStart和compositionEnd方法,这个问题我会在跟一下,感谢大家反馈 |
@sWhite01111 #293 我提了一个,我在firefox chrome opera一些浏览器测试了一下,compositionStart compositionEnd 和ngmodelchange在firefox chrome触发顺序是一致的,opera不会触发compositionStart和compositionEnd,木有测试safari,不知safari会如何表现 |
在ios9下输入中文会重复的问题会复现 |
目前 有解决的方案吗? 或者是说 用另外一种事件去代替 onChange的触发呢? |
如果ISO装了搜狗输入法,则不会,如果原生输入法,部分IOS确实会这样的问题。这个问题困扰几天了。 |
对的 IOS原生的输入法也就只有低版本的才会 貌似ios11以上的机子 使用原生输入法都不会这样 |
现在的解决方案是inputChange增加setTimeout,让compositionEnd触发在change之前,在ios9,chrome以及safari下测试时正常的,pr已提,大家可以多测试一下 |
<InputItem [clear]="true"
[value]="value"
[placeholder]="'请输入'"
(onChange)="valueChange($event)"
进入焦点和移出焦点都不触发onChange事件, 反而输入内容后删除内容会触发。
The text was updated successfully, but these errors were encountered: