ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

bug: When side menu is disabled, expose-aside-when="large" still triggers

Open matiastucci opened this issue 12 years ago • 13 comments

Type: bug

Platform: all

In the 'ion-side-menu' when is-enabled="false", expose-aside-when="large" is still triggering. So in some sections I am disabling the menu but if the width is greater than 768px the menu is still appearing.

Codepen: http://codepen.io/matiastucci/pen/oHapg

matiastucci avatar Sep 15 '14 01:09 matiastucci

Thanks for the codepen example!

adamdbradley avatar Sep 15 '14 04:09 adamdbradley

Perfect, thanks to you!

matiastucci avatar Sep 15 '14 04:09 matiastucci

In the nightly this should be fixed?

matiastucci avatar Sep 19 '14 01:09 matiastucci

Sorry to reopen this, but is still happening: http://codepen.io/matiastucci/pen/JeAsl?editors=100

Thanks!

matiastucci avatar Sep 25 '14 03:09 matiastucci

.@matiastucci i can confirm the same.

zarko-tg avatar Sep 25 '14 13:09 zarko-tg

Same here

gsohn avatar Dec 20 '14 14:12 gsohn

The expose-aside-when feature is pretty poorly thought out/configured IMO... There needs to be an easier way to override when to show/hide the exposed side menu, beyond using media queries -- We need to be able to control this easily with JS as well! I think the directive needs another attribute that takes a true/false expression and shows or hides itself based upon that.

As an example: If a user hasn't logged into my app yet, I may not want to have the side menu options exposed (they might be dynamically set according to the user). In this case, having expose-aside-when set to large will unfortunately ensure that the side menu is always shown which means I can't use it without writing my own code for fighting against the way it currently works.

flinn avatar Mar 10 '15 18:03 flinn

I'm also having the problem. I didn't found a proper way to close / toggle a left side menu which has the expose-aside-when directive. Using $ionicSideMenuDelegate.isOpenLeft() always returns false. This is quite inconsistent. Even when using directives such as ng-if or ng-show, I didn't manage to find a solution !

Thanks

qa2gr avatar Mar 24 '15 11:03 qa2gr

noKid

http://pain-advice.com/betonmarkets-front

24.03.2015, 14:12, "noKid" [email protected]:I'm also having the problem. I didn't found a proper way to close / toggle a side menu which have the expose-aside-when directive. Using $ionicSideMenuDelegate.isOpenLeft() always returns false. This is inconsistent and should be changed.

Thanks

—Reply to this email directly or .

Fayozjon avatar Mar 24 '15 17:03 Fayozjon

it's still visible even though disabled

unek avatar Jun 06 '15 20:06 unek

Tis bug is still present in the v1.1.0

5im0n avatar Sep 16 '15 07:09 5im0n

I also have this bug when using expose-aside-when and it's really annoying. Did someone found a workaround for this?

Here's a simple "hack" I've made that could maybe help others:

  1. create ng-class for <ion-side-menu-content> with a statement:
<ion-side-menu-content ng-class="{'menu-disabled': state.current.name === 'app.login'>
  1. Add css element menu-disabled in your CSS file:
ion-side-menu-content.menu-disabled {
  width: auto !important;
  transform: initial !important;
}
  1. ???
  2. Profit.

:+1:

lordgreg avatar Nov 03 '15 10:11 lordgreg

hi, in version 1.3 I am still getting the same behavior (exposed-aside-when seems to override is-enabled)

@lordgreg approach solves my use case, but this is still a bug / inconsistency in my opinion.

bianchimro avatar May 15 '16 17:05 bianchimro