ionic-team / ionic-v1

The repo for Ionic 1.x. For the latest version of Ionic, please see https://github.com/ionic-team/ionic
Other
193 stars 187 forks source link

fix(modal): unresponsive app when using both modal and popover #219

Closed shanesmith closed 3 years ago

shanesmith commented 7 years ago

Short description of what this resolves:

When both a modal and popover are used at the same time there is the possibility of the "modal-open" or "popover-open" body classes not being removed when the modal or popover is hidden. Since these body classes have pointer-events: none in their styling the app becomes unresponsive.

See comment here: https://github.com/driftyco/ionic/commit/6ed7253#commitcomment-20105088

Changes proposed in this pull request:

Test only for the modal's viewType in the modalStack when deciding to remove the body class.

Ionic Version: 1.3.2

Fixes: #71

VinceOPS commented 7 years ago

+1.

Cleaner version of the fix I proposed here. Good job!

shanesmith commented 7 years ago

Oh, thanks for linking the issue, I had searched and somehow missed it. =)

marcushultgren commented 7 years ago

Great fix. Why is this fix not merged already?

VinceOPS commented 7 years ago

It looks like the ionic team completely dropped the support of the v1. They're probably too busy with the v2 (well, it's even v3 now). I suggest you to fork the project and do your own changes/merges....

marcushultgren commented 7 years ago

Already did just that. I understand that 1.x is not a priority right now but a bug like this should be fixed, don't you think?

VinceOPS commented 7 years ago

Yes, I do think. We all do! That's why I created an issue + proposed a fix, and shanesmith created a PR. I guess we'll have to rely on the community to maintain ionic v1 :) (and we've already been going this way for a few months).

pablomaurer commented 7 years ago

@perrygovier Could you please merge this? Give you some 👏 and will make a 🎉 and eat a 🍰 if you do this. =)

daweedm commented 7 years ago

If someone continues to face this issue after applying the suggested patch and is using angular material along with ionic-v1 you have to add $mdGestureProvider.skipClickHijack(); in the config part of your app module.

This will prevent firing click multiple times on mobile device (Chrome doesn't seems to be affected, at least on OSX 10.10.5) making the modals pushing themselves multiple times in the modalStack array responsible to adding the modal-body class to the body and keeping the app unresponsive.

CheetahDev commented 7 years ago

@jgw96 @perrygovier @mlynch or anyone in the Ionic team to merge this and publish v1 update please? There are various PR waiting for merge, and a suppose a lot of teams waiting for them...

Thanks! :+1: