Ionic-framework: ionic2 <button> needs click twice in <ion-item> besides a <ion-input>

Created on 17 Jun 2016  路  12Comments  路  Source: ionic-team/ionic-framework

  • a button needs to be clicked twice if it is located in a ion-item besides a ion-input with html below:
<ion-item-group>      
    <ion-item>
        <ion-input type="text" placeholder="input something"></ion-input>
        <button calm outline item-right (click)="onClick()">Click</button>
    </ion-item>
</ion-item-group>

Steps to reproduce:

  1. input something in the <ion-input>
  2. click the button besides the <ion-input>
  3. there will be two clicks until the button clicked
  4. this issue seems like that: the first click is bring the foucus out of the <ion-input> and the second click is the real click on the button.
  5. I'm not sure the issue is designed by purpose or a bug, but I'm think this is very bad experience.
  6. ionic info:
Cordova CLI: 6.2.0
Gulp version:  CLI version 3.9.0
Gulp local:   Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.9
Ionic CLI Version: 2.0.0-beta.30
Ionic App Lib Version: 2.0.0-beta.16
OS: Win10 x64
Node Version: v6.2.0

Most helpful comment

I have fixed it by writing the following style in my .scss file:

.input-cover{
display: none;
}
Now i could able to focus on the first input field without any issue.

All 12 comments

Thanks for the issue! This isn't an exact duplicate of #6514, but they are both caused by the same problem which is that you have to blur the input in order to click the button.

Thanks for the issue! This will be fixed in the beta 10 release. :smile:

Thanks for your works @brandyscarney :+1:

@brandyscarney I am still having this same issue with RC4. In my case; however, I have a (click) event tied on an ion-input. It consistently requires two taps for the click event to fire.

  • this is inside a form, inside a list
      <ion-item>
        <ion-label floating>Type</ion-label>
        <ion-input tappable type="text" [ngModel]="type?.name" name="type" readonly (click)="selectType()"></ion-input>
      </ion-item>

Getting same issue with :


Date

Date will need double click to show native calendar

Ionic V. 3.12.0

I'm also having the same issue as above. My date fields are requiring two clicks in order to show the calendar.

    <ion-item>
        <ion-label floating>{{ 'Due Date' }}</ion-label>
        <ion-input type="date" [(ngModel)]="date" name="date"></ion-input>
    </ion-item>

ionic V. 3.13.0

Same issue for me, i need double click to show native calendar.

I have fixed it by writing the following style in my .scss file:

.input-cover{
display: none;
}
Now i could able to focus on the first input field without any issue.

Above is not working

same for me
<ion-label class="leaveLabel">Start Date</ion-label>
<ion-item class="regitem">
<ion-input type="date" formControlName="leave_from" required placeholder="Leave From"></ion-input>
</ion-item>
<ion-label class="leaveLabel">End Date</ion-label>
<ion-item class="regitem">
<ion-input type="date" formControlName="leave_to" required placeholder="Leave To"></ion-input>
</ion-item>

After double tap only date picker opens

@jaggu07 the issue is closed 2 years ago. I don鈥檛 think Ionic team is following old closed issues. You better create a new issue with reference to this one if still a problem.

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