ionic-framework: bug: $ionicConfig.views.swipeBackEnabled does not work
Type: <span ionic-type>bug</span>
Platform: <span ionic-platform>ios</span> <span ionic-platform-version>8</span> <span ionic-webview>webview</span>
<span ionic-description>ionic bundle version v1.1.0
Since #3470 is closed, I’m opening a new one.
I have the following code (that I believe should be the default on iOS, but whatever) :
$scope.$watch(function () { return $ionicSideMenuDelegate.isOpenRight(); }, function (isOpen) {
if (isOpen){
$ionicConfig.views.swipeBackEnabled(false);
} else {
$ionicConfig.views.swipeBackEnabled(true);
}
});
This code simply disables the swipe to go back when the right side menu is opened. Why is this needed ? Because the user closes the side menu with a swipe (or a more slow drag and drop (btw that feature is awesome)) that also goes back in the history.
Unfortunately, $ionicConfig.views.swipeBackEnabled(true/false); is not working 😢
Some steps to reproduce :
- platform : iOS
- ionic version v1.1.0
- ionic app with a
ion-side-menu side="right"and aion-nav-view - users navigates to a sub route (let’s say from route “foo” to route “foo.bar” in the
ion-nav-view) - users opens the right side-menu
- users slowly swipes from left ro right
- Bug : the right menu closes AND the view navigates back
Is that clear enough ? I can make a video since it’s pretty specific, if necessary. I understand describing an animation/user-interaction bug is hard.
Regards
</span><span is-issue-template></span>
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 17 (4 by maintainers)
Commits related to this issue
- fix(navigation): swipe-to-go-back on a per-view basis in iOS issue #4574 — committed to ionic-team/ionic-framework by deleted user 8 years ago
- Update navViewController.js Fix issue #4574 — committed to sbatezat/ionic by sbatezat 8 years ago
This is resolved in this commit.
$ionicConfigProvider.views.swipeBackEnabled(false) doesn’t work for me either. Still can swipe back on iOS and will stuck in a blank page if the previous page is not cached and there is no way for me to go back or force but have to restart the app.
Edit: I think I am in the wrong thread. I was under the impression that I could use $ionicConfigProvider.views.swipeBackEnabled(false) to turn of the swipe back behavior in iOS. It turns out I was wrong and I should use $ionicConfig.views.swipeBackEnabled(false) in app.run() instead.
Same here. The page transaction animation showing two times when swipe and go back. :"( $ionicConfig.views.swipeBackEnabled not working