Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

touch / click problem right after modals/popovers hide/close #198

Open
jgw96 opened this issue Jan 17, 2017 · 22 comments
Open

touch / click problem right after modals/popovers hide/close #198

jgw96 opened this issue Jan 17, 2017 · 22 comments

Comments

@jgw96
Copy link
Contributor

jgw96 commented Jan 17, 2017

From @emps on February 25, 2016 14:54

Short description of the problem:

after closing or hiding popover or modal there is some ms that touch events not working
and this issue force ppl double click the screen else need wait some ms i dont know how much but close to 1sec

Ionic Version: 1.2.4 , ... , 1.3.1

Browser & Operating System: Android / Chrome
(ios not tested)

Copied from original issue: ionic-team/ionic-framework#5609

@jgw96
Copy link
Contributor Author

jgw96 commented Jan 17, 2017

From @agrt56 on February 29, 2016 3:25

I have experienced a similar problem on ios 9 (Safari) and ionic v2. After each page transition (even menu opening/closing) it takes 1-2 seconds till a click-event on a button can be triggered.

On android 5.x everything seems to be fine.

@jgw96
Copy link
Contributor Author

jgw96 commented Jan 17, 2017

From @emps on February 29, 2016 8:13

here the problem accure only with modals/popovers

@jgw96
Copy link
Contributor Author

jgw96 commented Jan 17, 2017

Thanks for opening this issue! Would you mind giving us a code sample or codepen so that we could easily repro this issue? Also if you dont mind could you run ionic info and past the output here? Thanks again!

@jgw96
Copy link
Contributor Author

jgw96 commented Jan 17, 2017

From @agrt56 on March 15, 2016 0:56

I've opened a new issue for my problem (ionic-team/ionic-framework#5838), as this here is adressed to v1.

@jgw96
Copy link
Contributor Author

jgw96 commented Jan 17, 2017

Hello! Thanks for opening an issue with us! Since it has been a little while since there was any activity on this issue i will be closing it, but feel free to respond back if your still having the issue! Thanks again!

@jgw96
Copy link
Contributor Author

jgw96 commented Jan 17, 2017

From @emps on March 31, 2016 11:4

an easy way to fix issue to close it

@jgw96
Copy link
Contributor Author

jgw96 commented Jan 17, 2017

Hello @emps Im happy to reopen this issue (: It was closed due to there being no activity on the issue for a specific amount of time from the original poster. @agrt56 commented but just to let us know he opened another issue as this one was related to v1. Would you be able to provide a codepen or plunkr so that we can use it to repro this issue? Thanks!

@jgw96
Copy link
Contributor Author

jgw96 commented Jan 17, 2017

From @emps on April 3, 2016 20:3

yes i will make tomorrow morning codepen thanks

@jgw96
Copy link
Contributor Author

jgw96 commented Jan 17, 2017

Hello (: Have you gotten a chance to make that codepen yet?

@jgw96
Copy link
Contributor Author

jgw96 commented Jan 17, 2017

From @emps on April 5, 2016 17:10

hii well i wanted to build an example right now but i see there is already one built
http://codepen.io/ionic/pen/GpCst
so the problem is there when u click on the more icon u get popover open and then press at backdrop to close it and imidiatly click on other tab u will see u will see click not working first 1sec as popover get close/hide same with modals

@jgw96
Copy link
Contributor Author

jgw96 commented Jan 17, 2017

From @emps on April 5, 2016 17:13

and its not tabs problem its any button or any element u will add there u cant click first 1sec after popover/modal get closed. its a big problem imo ppl cant wait they like touch screen

@jgw96
Copy link
Contributor Author

jgw96 commented Jan 17, 2017

From @christoffer-Van on April 18, 2016 21:24

Want to add this only happens for me when I click back in the top left corner. If I swipe back, it's not a problem. Anyone else notice this behaviour as well?

@jgw96
Copy link
Contributor Author

jgw96 commented Jan 17, 2017

From @emps on July 2, 2016 8:31

this problem can be fixed if the backdrop will removed from the dom with no delay cause the first click is fired on the backdrop div

@jgw96
Copy link
Contributor Author

jgw96 commented Jan 17, 2017

From @neolectron on August 3, 2016 1:59

I have the same problem too, its still here in ionic 1.3.1
(a codepen to test with the last versions : http://codepen.io/anon/pen/KrxRXx )
Does anyone has a quickfix for this ?

It look like this commit was almost resolving the bug.

in my opinion the popup closes, then check the highest modal in the modalStack variable,
since the popup is closed, the highest modal is ... ...the parentModal, then the .remove() is applied on it. (not sure about that)

@jgw96
Copy link
Contributor Author

jgw96 commented Jan 17, 2017

From @gromon42 on August 3, 2016 2:9

Ok i ve just run your code pen and i m having the same problem, i would really like the ionic team to fix it because it could really be annoying when using an app that the current modal closes itself for no reason after an alert/popup closes.

@jsanta
Copy link

jsanta commented Feb 7, 2017

Just faced this problem.
The scenario:

  • A screen with a menu button that opens a popover with a link.
  • The link open a modal.
  • After coming back from the modal the screen is unclickable.

Happens on iOS and on Chrome (testing using Ioniclab)
Checked the code and the body tag still had the popover-open class, so my findings pointed to an unclosed popover after hiding the modal.

Added this code to my controller:

$scope.$on('modal.hidden', function () {
        console.log('modal hidden');
        $scope.popover.hide();
    });

and now it works as expected.
Hope it helps as a workaround.

Best regards from Chile,
José Ignacio

@LeraPodkur
Copy link

LeraPodkur commented Feb 17, 2017

I have the same problem with the popup.

Owl carousel slides have buttons that open a popup.
After closing the popup the screen is unclickable.
How can I fix it?

@jsanta
Copy link

jsanta commented Apr 10, 2017

You'll have to force and explicitly hide the popover. Don't rely only on the popover closing button. That worked for me.

@drquochoai
Copy link

drquochoai commented Apr 29, 2017

add this css style to your project will solve the problem with all modals/popovers
.click-block{ display: none; }

@SebastianSchirmer
Copy link

@jsanta @LeraPodkur Your issues seem to be caused by this one here: #71

There is also a PR linked in issue #71 mentioned above which fixes it, but the PR hasn't been merged yet.

@bhagwans
Copy link

bhagwans commented Jul 11, 2017

@jsanta @LeraPodkur I had similar problem in my ionic 2 application. I solved it by using "this.navCtrl.pop()" to close the modal insted of using "dismiss()" function.

Note: Do not use "this.setRoot()" function right after closing the modal

@jsanta
Copy link

jsanta commented Jul 11, 2017

@bhagwans thanks!
Anyway this issue affects ionic-v1, no setRoot nor Typescript here :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants