Skip to content
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

bug: When expose-aside-when is true the menu-close directive should be disabled #4663

Closed
konsultaner opened this issue Nov 24, 2015 · 3 comments

Comments

@konsultaner
Copy link

Type: bug

Platform: all

I'm using the expose-aside-when on the side-menu directive and was wondering why my side-menu would dissapear and leave a gap on the opposite site. The reason was that I was also using the menu-close directive at the same time.

It does the right job, so this is a feature rather then a bug. I cannot see any scenario where a developer would want to close the side menu when it is exposed with expose-aside-when. If for some reason this is the case, then the content should not stay in the reduced width.

@konsultaner konsultaner changed the title When expose-aside-when is true the menu-close directive should be disabled bug: When expose-aside-when is true the menu-close directive should be disabled Nov 24, 2015
@mlynch
Copy link
Contributor

mlynch commented Dec 7, 2015

Did this fix it? #2328

@konsultaner
Copy link
Author

I fixed it with copying the menu-close directive and fixing it:

['$ionicHistory', '$timeout', function($ionicHistory, $timeout) {
    return {
        restrict: 'AC',
        link: function($scope, $element) {
            $element.bind('click', function() {
                var sideMenuCtrl = $element.inheritedData('$ionSideMenusController');
                if (sideMenuCtrl && !sideMenuCtrl.isAsideExposed()) {
                    $ionicHistory.nextViewOptions({
                        historyRoot: true,
                        disableAnimate: true,
                        expire: 300
                    });
                    $timeout( function() {
                       $ionicHistory.nextViewOptions({
                            historyRoot: false,
                            disableAnimate: false
                        });
                    }, 300);
                    sideMenuCtrl.close();
                 }
            });
        }
    };
}]

@jgw96
Copy link
Contributor

jgw96 commented May 24, 2016

Hello all! As it seems it has been a while since there was any activity on this issue i will be closing it for now. Feel free to comment if you are still running into this issue. Thanks for using Ionic!

@jgw96 jgw96 closed this as completed May 24, 2016
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants