Sulot
December 11, 2016, 11:36am
1
Hi,
I am training by making a ruzzle-like. I don’t understand how to remove this little lag.
It is (click) event. My function Touched() does other stuff but it is not coming from that. I tested with an empty test() function and console.log().
Beside, how to make the letters selected on swipe? Because (swipe) is not working.
A little video:
https://sendvid.com/m046dmy6#
My simple code:
<div class="letter" (click)="Touched()" [ngClass]="{'touched': touched }">
{{value}}
</div>
Try adding the ‘tappable’ directive to your div
<div class="letter" tappable (click)="Touched()" [ngClass]="{'touched': touched }">
{{value}}
</div>
Sulot
December 12, 2016, 10:19am
3
Thanks. I ll try it tonight.
For other who might read this thread, you can find ressource here:
When applying the <button ion-item (click)="doSomething()"> instead of <ion-item ...> the funny thing is, that the delay is only removed when clicking the arrow icon in the button, not the button by itself. When tapping the icon, it behaves like it’s supposed to, but other than that is has a delay or need te be clicked twice, especially when coming back from another page…
Sulot
December 12, 2016, 7:52pm
4
Still having this lag… Any idea ?
Sulot
December 12, 2016, 8:23pm
5
Sometime to solve a problem you just need to read the doc. Of ionic, then angular, then mozilla !
RaulGM
December 12, 2016, 9:29pm
6
Try (tap)
in stead of (click)
.
Sulot
December 12, 2016, 9:42pm
7
same issue… I tried other dom event as mouseleave or mouseenter same issue. Working perfectly on browser.
RaulGM
December 13, 2016, 11:16am
8
Right in the link you posted, it’s said that you should not click it from a div, that that’s exactly what makes the delay to happen. try:
<div class="letter" (click)="Touched()" [ngClass]="{'touched': touched }">
<a (click)="Touched()">
{{value}}
</a>
</div>
Sulot
December 13, 2016, 11:33am
9