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

<ion-menu side="right"> is broken in ionic 2.0.0-beta.6

Open efishman15 opened this issue 10 years ago • 8 comments

Hello,

I have just upgraded from ionic 2.0.0-.beta.4. to 2.0.0-.beta.6 and encountered the following (reproducible) problem (see plunker bellow):

My app is working from right to left () and my menu is set to side="right". On a PC platform, the app is "narrowed" down to 780 pixels (although the screen is a hide resolution with 1680px wide - this is achieved by setting style="width: 780px; margin-left: 450px" on the ion-app component - margin-left is of course computed in run-time. In this scenario when opening the menu - it is NOT displayed, and while debugging I see that it's positioned on the FULL right of the screen (e.g. close to 1680px - taking down the 304 width of the menu) - thus resulting outside the boundaries of the ion-app.

Expected: Like it worked in beta 4 - it should be aligned to the right side of the ION-APP and not to the right side of the entire PLATFORM.

Please see the following plunker to reproduce:

http://plnkr.co/edit/tW891Jse8U5kpuvb3cML?p=preview

Changing the side to "left" works fine.

Thanks, Eddy

efishman15 avatar May 02 '16 12:05 efishman15

Hello! Thanks for opening an issue with us! So i tried to reproduce the issue with your plunker but im unsure of a few things. What is the reasoning behind putting style on the ion-app component?

jgw96 avatar May 02 '16 16:05 jgw96

Hi,

The app is serving as a multi-platform app working in the same manner in a web (pc), facebook canvas, and mobiles and it adjusts itself to the resolution. In Facebook canvas we are able to work with no larger than 780 pixels so for high resolution screens we put set the app to fixed width of 780 pixels and center it - so we have white stripes margins on left/right - this is done by putting the style on the ion-app - same could have been achieved by putting it on the document.body element I guess.

Eddy

efishman15 avatar May 02 '16 18:05 efishman15

Hello. Unfortunately i was not able to reproduce with your plunker, but once i made a new project with our sidemenu starter this is what i found. Without the styling on the ion-app element setting the sidemenu to right by using side="right" worked fine. As soon as i took your styles and put them on either the ion-app element or the body element of the page setting the sidemenu to right stopped working as you pointed out. Looking more into this now.

jgw96 avatar May 04 '16 17:05 jgw96

Hi Justin,

It's great that you were able to reproduce this in your lab. Just a hint/reminder - this was working fine for sure in beta.4 - so I guess comparing the code changes around this since then would help.

Eddy

efishman15 avatar May 04 '16 17:05 efishman15

Hello @efishman15 would you mind giving this a try with the latest version of Ionic 2? Thanks!

jgw96 avatar Jun 09 '16 21:06 jgw96

Hi Justin,

I just upgraded to ionic 2 beta 8 - and unfortunately it is still happening. Does it work in your labs on beta 8?

Thanks, Eddy

efishman15 avatar Jun 12 '16 17:06 efishman15

Hi Justin,

I just upgraded to ionic 2 beta 9 and problem is resolved! Issue can be closed.

Thanks, Eddy

efishman15 avatar Jun 18 '16 11:06 efishman15

I think it was fixed here: https://github.com/driftyco/ionic/commit/0c885899bca2b1e7ed6fa85377edb7ecf1a682b8

manucorporat avatar Jun 18 '16 11:06 manucorporat