-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
select gets tap, when below Ionic Popup's Ok Button #1594
Comments
Thank @dbms. It looks like the the |
A little more research, |
What's happening is that Ionic is simulating the click for the button so that it happens immediately after touchend (to remove the 300ms delay). However, iOS is also firing off the actual click 300ms later. By the time iOS fires off its click, the popup has gone away and what is showing is the select element in the same location. Preventing any second clicks in the same location is what Ionic originally used to remove the 300ms, but it proved to cause too many issues, and it caused too large of delay between clicks when clicking fast in the same location. This issue is the same which actionsheet and modals have because those services also remove themselves from the view when its done, but the native click 300ms later causes issues when clicking the content underneath the actionsheet/modal/popup. We should verify if its only a Also, be sure to update your code to use the latest Ionic version. |
@perrygovier Thanks for taking this up!! Just to correct myself in the Problem Statement, it is not specifically 'OK' button of the PopUp, it happens on the 'Cancel' also - if the underlying |
Ok, some more investigation. Text inputs will also gain focus, but buttons do not. I get a Since we're creating our own click handlers, what if we added an extra blocking parameter to click events? So most buttons would not get this, but when our click event triggers an animation that could reveal a new input element, we provide a param that blocks click events for 400ms? |
@adamdbradley I have changed some code in the ionic.bundle.js as you had suggested - to increase the time after which the backdrop is removed
This seems to correct the issue for now, at least on the tests on the iPhone Simulator. |
@dbms, @adamdbradley This issues occurs with the actionsheet as well. And though increasing the time from 100 to 400 after removal of the backdrop seem to work correctly for the popup, it does not for the actionsheet. Any more thought on this? And is this issue not similar to: #1536 ? |
This should be fixed from: 20d567f |
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. |
Issue -
If a popup's 'OK' button is right above/over an underlying select option, then after selecting the 'OK' button of the popup, the select also gets called.
Sample Code - https://github.com/Dbms/Ionic_Sample_2
Steps to reproduce issue -
Note -
The text was updated successfully, but these errors were encountered: