ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

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

Open emeryao opened this issue 10 years ago • 12 comments

  • 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
  • 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.
  • I'm not sure the issue is designed by purpose or a bug, but I'm think this is very bad experience.
  • 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

emeryao avatar Jun 17 '16 11:06 emeryao

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.

brandyscarney avatar Jun 17 '16 14:06 brandyscarney

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

brandyscarney avatar Jun 24 '16 17:06 brandyscarney

Thanks for your works @brandyscarney :+1:

emeryao avatar Jun 25 '16 14:06 emeryao

@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>

joshuaohana avatar Dec 23 '16 20:12 joshuaohana

Getting same issue with :

        <ion-label>Date</ion-label>
        <ion-input tappable type="Date" [(ngModel)]="act.date" name="date"></ion-input>
      </ion-item>

Date will need double click to show native calendar

Ionic V. 3.12.0

oxykill avatar Oct 03 '17 12:10 oxykill

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

dniemuth avatar Nov 16 '17 21:11 dniemuth

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

yajuve avatar Nov 17 '17 10:11 yajuve

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.

luckychel avatar Jan 30 '18 21:01 luckychel

Above is not working

AlokGupta007 avatar Jun 12 '18 05:06 AlokGupta007

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 avatar Aug 05 '18 20:08 jaggu07

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

trakhimenok avatar Aug 06 '18 15:08 trakhimenok

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.

ionitron-bot[bot] avatar Sep 05 '18 16:09 ionitron-bot[bot]