I made an Ionic v6 (using Capacitor) and Angular 14 app that has an input field and + and - button next to it for increasing and decreasing the number in that input field…
The issue I am facing is the keyboard… When I click/tap on the input field the keyboard opens up and a page scroll happens to scroll to the input. That is good and correct. But the issue is with the + and - buttons… When clicking/taping on the button it also opens the keyboard but the scroll to that input doesn’t happen.
So my question is… how do I prevent the keyboard from opening on these two buttons or if there is perhaps a way to scroll to that input?
Here is the code how the input is constructed and an image how it looks like:
<ion-item lines="none" slot="end" [disabled]="product.stock === null">
<ion-icon color="vigros" name="remove-circle" (click)="decrementQty(product)"></ion-icon>
<ion-input type="number" value="0" min="0" step="1" [(ngModel)]="product.qty"></ion-input>
<ion-icon color="vigros" name="add-circle" (click)="incrementQty(product)"></ion-icon>
</ion-item>