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

ionic 2 menu grey square

Open vonovak opened this issue 10 years ago • 66 comments

Short description of the problem:

When using the project created by ionic start mem2 tutorial --v2 and running on android 5.1.1 device.

When the app starts up: screenshot_2016-05-03-17-53-14

When I toggle the menu and then hide it. (note the grey square under the hamburger menu) screenshot_2016-05-03-17-51-03

What behavior are you expecting?

I would expect the images to look the same (note the grey square under the hamburger menu).

Steps to reproduce:

  1. ionic start mem2 tutorial --v2
  2. ionic run android
  3. Swipe the menu right and left / toggle it by the "toggle menu" button or hamburger menu button and swipe back. Apparently the bug doesn't exhibit itself each time you run the app.

When the grey square is present, it seems that pressing the blue button makes it go away.

Cordova CLI: 6.1.1
Ionic Framework Version: 2.0.0-beta.6
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
OS: Distributor ID: Ubuntu Description: Ubuntu 15.10 
Node Version: v5.10.1

vonovak avatar May 03 '16 16:05 vonovak

Ahh good catch! I can see this with our sidemenu starter on Android 5.1.1, Android 6.0.1 and Android N dev preview 2.

jgw96 avatar May 03 '16 16:05 jgw96

I'm experiencing the same problem with Ionic 1 (version Delhi and higher).

MartineFrancken avatar May 20 '16 12:05 MartineFrancken

+1 in Ionic 2 beta 7

WHarris22 avatar May 20 '16 13:05 WHarris22

+1 occurs in platform:ios too when using chrome debugger, Ionic 2 beta 7.

nyankobu010 avatar May 23 '16 21:05 nyankobu010

Found out this only occurs when the content doesn't overflow the particular screen size being tested (when you aren't able to scroll for a particular view). Hope this helps someone with finding the root cause.

nyankobu010 avatar May 30 '16 21:05 nyankobu010

Hello all , this has been fixed for our beta.10 release. If you would like to try it out early you can install the latest ionic 2 nightly with npm install ionic-angular@nightly. There are some very minor breaking changes in this release that we will have full upgrade instructions for when we release but the biggest thing is that

<ion-navbar *navbar>
</ion-navbar>

should be changed to this

<ion-header>
  <ion-navbar>
  </ion-navbar>
</ion-header>

Thanks for using Ionic!

jgw96 avatar Jun 27 '16 15:06 jgw96

Seeing this issue again with the latest nightly. Reopening to investigate more.

jgw96 avatar Jun 27 '16 19:06 jgw96

Exactly the same issue.

lordgreg avatar Jun 29 '16 14:06 lordgreg

Note for the team: Did some debugging on this and got some really weird results. If you inspect the page with chrome dev tools that little grey square does not seem to be in the dom.

jgw96 avatar Jun 30 '16 17:06 jgw96

I still see the little gray square on both ios and android devices with beta10

ghenry22 avatar Jul 07 '16 10:07 ghenry22

It is also reproduced on ionic 1.3. Small grey box in empty list. When I'm trying to change any style of content (in chrome dev tools) - the box is gone, even I revert my changes.... it's really strange...

tarasok avatar Jul 11 '16 12:07 tarasok

I've noticed two things when I play around in the chrome dev tools, but neither really help with finding the cause of it but could help with the DOM location (ion-header or scroll-content or my testing could just be wrong all together!).

First off, if you untick the ion-header element property position: absolute; the header goes back to position: static; which hides the header and the grey square behind the ion-content as this element is 100% height and width. So this must mean it is something to do with the ion-header element right?

And second, I've also noticed that if you increase the property margin-top:56px; to lets say 100px on the scroll-content element inside the ion-content this causes the square to move further down the screen.

So two different thiings seem to affect the grey square but are not child or parent elements they are more sibling / adjacent to each other. Hmmmm

Note: changing values in chrome inspector cause the square to disappear, so you have to open and close the menu again to see where it gets re-positioned.

WHarris22 avatar Jul 28 '16 14:07 WHarris22

I think i've came to the conclusion that it is the scrollbar of the scroll-content element!!

On the scroll-content element if you change overflow-y: scroll; to overflow-y:auto; it gets rid of it. And also if you change overflow-x: hidden; to oveflow-x:scroll; the grey square changes slightly due to the vertical and horizontal scrollbars overlapping :)

So I think the correct fix (that works for me) is

scroll-content{
      overflow-y: auto;
}

Not sure if this will cause anything else to break or not though

WHarris22 avatar Jul 28 '16 14:07 WHarris22

Something else that seems to make the square disappear is when you do the following

<ion-content fullscreen="true">

I hope this information is helpful for implementing a fix

WHarris22 avatar Aug 01 '16 11:08 WHarris22

i started to see this more often in beta11 than beta8

kodeine avatar Aug 08 '16 17:08 kodeine

Hello! Happy to report that i can no longer reproduce this issue with the latest nightly. Because of this, I am going to be closing this issue for now. Thanks for using Ionic!

jgw96 avatar Aug 22 '16 16:08 jgw96

@jgw96 please reopen, the bug is there again.

laserus avatar Oct 19 '16 08:10 laserus

@jgw96 The issue occured for me in modal page (.modal-wrapper). I fixed it with overflow-y:auto on .scroll-content. Happened on Android device, not in desktop chrome.

Version: 2.0.0-rc.1-201610191717 (nigtly)

filipsuk avatar Oct 24 '16 22:10 filipsuk

@jgw96 i'm getting the square box in rc1 as well.

screenshot from 2016-10-24 19-26-43

kodeine avatar Oct 25 '16 00:10 kodeine

Also getting this in rc1

ghenry22 avatar Oct 25 '16 01:10 ghenry22