ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
50.94k stars 13.52k forks source link

Slidebox: pager dissapears on iOS device if it is displayed over a background #2228

Closed CoenWarmer closed 9 years ago

CoenWarmer commented 10 years ago

I'm using a slidebox where the ion-slides have a background.

When I try to run this in the simulator, the pager disappears and reappears when scrolling ion-content up and down. Please see this video for an illustration of what is happening:

https://dl.dropboxusercontent.com/u/10543747/slider_issue.mov

Basically once a div that goes underneath the pager, that div clips over the pager once you scroll past a certain point. I have no idea why this is happening. Z-index on the pager seems to be ignored.

It could have something to do with the fact that when you scroll the pager under the status bar, it dims a little bit. However, I can't pinpoint if this dimming effect is something in the CSS, since the DOM doesn't seem to change when inspecting. Any ideas? It looks really buggy right now.

franckclement commented 9 years ago

Hi, Got the exact same issue described by @CoenWarmer with ionic v1.0.0 "uranium-unicorn". It seems to be elements with position:absolute over the slidebox. Those elements twinkle on scroll, only on iOS. And yes 'It looks really buggy'.

The only solution is to remove any background from the slidebox.

hasandogu commented 9 years ago

Annoying indeed. I have just found the following solution though...

http://forum.ionicframework.com/t/slidebox-pager-issue-while-scrolling-view/30767/2

It worked for me by adding translateZ to the slider-pager as well as other position:absolute elements.

.slider-pager { -webkit-transform: translateZ(0); transform: translateZ(0); }

wanglinjiang commented 8 years ago

@hasandogu Thank you ! It works for me