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

".overflow-scroll .scroll" isn't positioned correctly #1281

Closed
fredgalvao opened this issue May 6, 2014 · 4 comments
Closed

".overflow-scroll .scroll" isn't positioned correctly #1281

fredgalvao opened this issue May 6, 2014 · 4 comments
Assignees
Milestone

Comments

@fredgalvao
Copy link

Well, I'm sorry to resurrect this one, but I found out the position: static from .overflow-scroll .scroll caused bad positioning and layout on two of my views on pretty much all Android devices I have to test (Moto [email protected], Nexus [email protected], [email protected], [email protected], Galaxy [email protected] and Chrome-Ripple@34). I didn't see/say this before because I've been isolating a bunch of things on my code and only now I've stumbled on this with no other culprit on the screen.
The strange positioning is pictured in the screenshots attached.

I haven't been able to reproduce it with a simple example yet (haven't tried very much yet), but I've managed to fix it with no downsides or undesired consequences so far by specifying this on my side:

.overflow-scroll .scroll {
    position: absolute !important;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
}

I actually think that's a reasonably better option according to what I know of css positioning, knowing that Ionic creates an additional layer between ion-content and the actual content: the div.scroll, and thus it's pretty safe to have that layer positioned. I have looked back in _scaffold.scss's commits on this block and found nothing that could hint a bug fixed by choosing static over absolute, but I might as well be wrong on this one.

The height: 100% part can also be removed if top+bottom is used.

code
ion-content
scroll

@fredgalvao
Copy link
Author

Any news on this? I've just tested it again without my hotfix on beta6 and the problem still exists.

@ajoslin
Copy link
Contributor

ajoslin commented Aug 20, 2014

Looking into this now.

@ajoslin
Copy link
Contributor

ajoslin commented Aug 20, 2014

Not finding any problems with this fix on any device. Since there should always be a parent <ion-view> or similar, the position: absolute; works fine.

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 6, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 6, 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