question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Need to click ion-button two times to trigger the click event

See original GitHub issue

Bug Report

Ionic version: 5.4.16

Current behavior: I have to click two times to trigger the click event of an ion-button code chunk below

Expected behavior: It should trigger the (click) saveMessage() function

Steps to reproduce: open the keyboard by focusing on ion-textarea and press save when keyboard. is up press the save button the saveMessge() method wont fireup

Related code:

<div class="msgContainer">
    <div class="defaultFont ion-padding-bottom"><b> Instructions:</b></div>
    <div class="inputContainer">
      <div class="login-input">


        <ion-textarea (ionBlur)="checkBlur(true)" (ionFocus)="checkFocous(false)" [(ngModel)]="item"></ion-textarea>


      </div>
      <ion-button tappable color="primary"  (click)='saveMessage(item)'>Save</ion-button>
    </div>
    <ion-list class="listClass" *ngIf="!isBlur">
      <ion-item>dummy test1</ion-item>
      <ion-item>dummy test2</ion-item>
      <ion-item>dummy test3</ion-item>

    </ion-list>
  </div>





Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
achakra21commented, May 18, 2021

When I removed (ionBlur)="checkBlur(true)" (ionFocus)="checkFocous(false)"

It worked I was using ionBlur and ionFocus for detecting keypad is on or not , now I am getting that using Capacitor Keyboard Plug-in

0reactions
ionitron-bot[bot]commented, Jun 18, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Need to click ion-button two times to trigger the click event
I have to click two times to trigger the click event of an ion-button code chunk below open the keyboard by focusing on...
Read more >
I have to click twice to activate any button action (Ionic/Angular)
On iOS devices, I believe the first touch is seen as 'hovering' in a similar way to when you hover over something with...
Read more >
How to handle Click Events in Cypress | BrowserStack
Read tutorial to perform different click events such as click, right-click, double-click, and trigger event in Cypress using examples.
Read more >
Ionic 5 For Beginners : Adding Buttons with click events
Hi There, Thanks for watching.In this Video i will show you how to add button to your ionic 5 app and perform a...
Read more >
How to trigger a click() event on LWC element
I'm trying to trigger a click event on file upload element in LWC but not able to do that. it doesn't throw any...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found