-
Notifications
You must be signed in to change notification settings - Fork 85
ion-input requires two clicks inside ion-item :V2 RC4 #158
Comments
I am also experiencing this issue on Ionic v4 :-/ |
I am integrating my Ionic Project with Electron and getting the same issue. Into an Android and iOS devices works fine, but in my Electron environment, checkboxes and radio buttons requires two click events to work. Here is my following code:
|
Having this same issue, on Ionic 3.12.1 (with Angular 4), with Inputs and Radios. The input below has the issue, however the button doesn't have the issue.
|
This issue is also present in Ionic 4. I've tried to add "pointer-events: none" to label and input, and it's working for my use case.
With this approach I've also managed to bypass issue when there is ion-select inside ion-item and popover doesn't open until you touch edge or empty space of ion-item (which happens on iOS at least).
Of course you can put the "pointer-events: none" clause in .label-floating CSS class to make it default for all position="floating" labels, or in any other used CSS class. These code examples are just for fast pinpointing of the solution. |
This was working for me in Ionic 4.7.1 but is not working in 5.0.0 (in IOS). The pointer events hack helped me |
Original issue by @joshuaohana on 2016-12-23T20:54:06Z
Ionic version: (check one with "x")
[ ] 1.x
[x] 2.x RC4
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:
ion-input requires two taps to fire (click) event
I have an ion-input, besides an ion-label, inside an ion-item, inside a form, inside an ion-list. I have a (click) event tied to that input, as it's read only (I have it open up a modal). The input works find when running on desktop browser, but on iPhone 6 device the first click seems to blur the input but a second tap is required to fire the (click) event
Expected behavior:
I would expect a single click on the input to fire the (click) event
Steps to reproduce:
Issue does not present itself when running in desktop browser, only on device. Relevant code below should demonstrate what's going on. 100% reproducibility with the below
Related code:
Example in a form with floating label
Second, less complex example
Other information:
Seems very related to #6944 and #6514.
One clue might be that during certain configurations (ex; as a button inside a div) the first click blurs the input and stacks the label, then the second click actually fires the event. Can't figure out how to use that knowledge to make it work though.
Things I have tried but produce the same misbehavior:
I cannot figure out any workaround, which stinks, because this is a critical item in the form for my app, and it's not obvious that the user is required to click twice.
Ionic info: (run
ionic info
from a terminal/cmd prompt and paste output below):The text was updated successfully, but these errors were encountered: