Created
September 25, 2017 02:09
-
-
Save neilmaledev/8cae2f59265957cc7800adeceb44bbe3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
noop = angular.noop; | |
elevated = false; | |
var popupStack = $ionicPopup._popupStack; | |
if (popupStack.length > 0) { | |
popupStack.forEach(function(popup, index) { | |
if (popup.isShown === true) { | |
popup.hide(); | |
popup.remove(); | |
popupStack.pop(); | |
} | |
}); | |
} | |
$ionicBackdrop.release(); | |
//Remove popup-open & backdrop if this is last popup | |
$timeout(function() { | |
// wait to remove this due to a 300ms delay native | |
// click which would trigging whatever was underneath this | |
$ionicBody.removeClass('popup-open'); | |
$ionicBody.removeClass('modal-open'); | |
// $ionicPopup._popupStack.pop(); | |
}, 500, false); | |
($ionicPopup._backButtonActionDone || noop)(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment