ionic2 tap vs click

前端 未结 6 1902
隐瞒了意图╮
隐瞒了意图╮ 2020-12-09 17:02

I am starting with angular2 and ionic2;

In ionic2, I have a button that will call a method of my component. Like this:

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-09 17:25

    iOS has issues with click event in general (event on web, if you are testing in responsive mobile device in browser console).

    So what usually happens is user have to click twice to perform actions.

    I found of this is because if you are doing mobile development (chrome console or even iOS Emulator) you will have to use (tap) event instead.

    The problem was hard to know because of it's irregular behaviour, when you are using (click) on ,

    something which is usually non-clickable, this problem occurs.

    So if you use (tap) on such elements and (click) on , everything should work fine.

    My suggestion is to use both for the better!

提交回复
热议问题