skol-pro / ion-digit-keyboard-v2

A digital keyboard plugin to use in Ionic 2 applications.
MIT License
94 stars 40 forks source link

iphone5 change dom value seems slow #12

Open coolara opened 7 years ago

coolara commented 7 years ago

<div>{{stringName}}</div> <button (click)="changModel()">click~</button>

ts.

changeModel(){
this.stringName += "0";
}
skol-pro commented 7 years ago

Hi coolara, Your code will be slow on iOS for sure. That's not because of updating an input value, but because of the usage of (click), there is a 300ms latency.

You should replace you're event by touchend or something like that. Doing so, keep in mind that touch events aren't recognized by browsers without mobile emulation.

You need to add the tappable directive to you button. Check the doc: http://ionicframework.com/docs/troubleshooting/#click-delays

coolara commented 7 years ago

It seems not solve my problem,I follow your advice, when I tap quickly number'6' for five times. until I tap the last time , they all appear, When I tap each time.nothing appear

skol-pro commented 7 years ago

Have you tried using touchend ? (just to confirm)

coolara commented 7 years ago

yes also try touchstart

skol-pro commented 7 years ago

Well ok, can't really help actually, it's not even related to the keyboard plugin actually :p

coolara commented 7 years ago

many thanks keyboard plugin seems to have similar problem. when I click so quickly it is nonfluency;just on iphone5 ,

skol-pro commented 7 years ago

Hum, by "just on iPhone 5" you mean you tested on other devices without those kind of issues ?

coolara commented 7 years ago

yeah

skol-pro commented 7 years ago

Oh ok well then, it's maybe a more general issue related to the device and libs support.

coolara commented 7 years ago

can you find a way to solve it?or give me some advice,thank s I'm afraid I've taken your so much time.

skol-pro commented 7 years ago

Ha ha don't be afraid. Well since I can't test on a real iPhone 5 device, it's not gonna be easy. Also, I'm focussing on the keyboard next release stuffs :-/

coolara commented 7 years ago

hi @skol-pro ,i'm coming back.. i found out when i click quickly ,iphone5 cpu used 99%,it may cause not smoothly, how it happened