Ionic-framework: ion-checkbox change/click fire twice

Created on 1 Jun 2017  路  6Comments  路  Source: ionic-team/ionic-framework

Ionic version: (check one with "x")
[ ] 1.x (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[x] 3.x

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
I have a registration form with a simple checkbox:

<ion-item margin-top>
    <ion-label>Li e aceito os Termos de Uso</ion-label>
    <ion-checkbox [(ngModel)]="terms" name="terms" (ionChange)="onChangeTerms()"></ion-checkbox>
 </ion-item>

In the browser(tested in chrome) and android it works fine, but on IOS(10.3.2) the model changes twice when i click/tap on it.

2017-05-31 18:41:06.589541-0300 SupeRR Ofertas[5808:1337926] terms selection true
2017-05-31 18:41:06.589837-0300 SupeRR Ofertas[5808:1337926] terms selection false

Expected behavior:
Check and Uncheck a checkbox as i tap/click on it.

Steps to reproduce:
Create a new page from the command line(ionic g page page-name) and add a form with a simple ion-checkbox as it is in the docs.

Related code:

Other information:
I had this kind of problem(events firing twice) with other components in other apps i made, so this may not be specific to ion-checkbox. For example, in another project i had a button inside md-toolbar that would fire twice and it did work only inside a ion-navbar.

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

global packages:

    @ionic/cli-utils : 1.2.0
    Cordova CLI      : 7.0.1 
    Ionic CLI        : 3.2.0

local packages:

    @ionic/app-scripts              : 1.3.7
    @ionic/cli-plugin-cordova       : 1.2.1
    @ionic/cli-plugin-ionic-angular : 1.2.0
    Cordova Platforms               : android 6.2.3 ios 4.4.0
    Ionic Framework                 : ionic-angular 3.2.1

System:

    Node       : v6.10.2
    OS         : macOS Sierra
    Xcode      : Xcode 8.3.1 Build version 8E1000a 
    ios-deploy : 1.9.1 
    ios-sim    : 5.0.13 

All 6 comments

Hello, thanks for opening an issue with us! Would you mind creating a repo we could use to reproduce this issue?

Hi there, thank you for the response.
I will create the repo and post it here so you guys can have a look.

Hello! As it seems it has been a while since there was any activity on this issue I will be closing it for now. Feel free to comment if you are still running into this issue. Thanks for using Ionic!

Hey guys, I'm still leading with this issue!

Do you have any news about it?
Thanks.

@jgw96 Yep still have it, pretty breaking. Just got rejected for an app by Apple because of this and missed a deadline. 馃憥 馃

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Was this page helpful?
0 / 5 - 0 ratings