md-tabs does not work on iOS : tab content disappears
- contents of md-tabs does not appear on iOS (6 & 6Plus)
- Angular v1.4.4
- Angular Material v0.10.1
This was reported earlier: https://github.com/angular/material/issues/2955
Screen recording: https://youtu.be/PSz7dSNdV7g
Excellent. Thank you
I see content changing when you change tabs. Are you calling on tab select?
It might be a timing issue as seen here: https://github.com/angular/material/issues/4458
Yes I have md-on-select defined.
+1
+1
+1
+1
Also Chrome on iOS has the same issue. Tab content is not showing.
I think it might be somehow connected with -webkit-overflow-scrolling: touch as stated in #2640. I will check the hook added there cause I have same problem on iOS both Chrome and Safari.
Possibility of duplicate: #3446 ?
After testing:
Good:
- Adding
autoScrollclass that forces-webkit-overflow-scrolling: autotomd-contentas suggested in #2640 is fixing disapearing content on loading tab. - In my case
autoscroll also fixes issue with disapearing-apearing content durning scrolling what was another issue withtouchversion (Safari somehow re-render content that becomes again visible while scrolling).
Not good:
3. auto scrolling without momentum (touch) scrolling is not what you expect the auto one is not so UX friendly, but it's better to have bad scrolling than invisible content it would be perfect part-time solution but...
4. I have screen with textareas on the left with longer form that need scroll. When I tried to scroll with auto scroll on I couldn't scroll when touching inside textarea, only by touching outside elements. With touch version it's possible to scroll touching everywhere.
I looked for solution to problem 2. and landed on:
http://stackoverflow.com/questions/9807620/ipad-safari-scrolling-causes-html-elements-to-disappear-and-reappear-with-a-dela
and indeed adding this
md-content * { -webkit-transform: translate3d(0, 0, 0); }
fixed all mentioned issues by now. Looks hacky and probably may have per-case side effect. Don't know if it could be replaced right now with less impact solution and I think it doesn't fall into angular-material job to fix this browser issue maybe note that somehow only. But pasting for others looking for solution maybe somebody or me after some testing would find some gotchas or there is and css-performance-battery-drain guru here.
P.S. A lot same problems in Bootstrap issues might be found with iOS scrolling.
There is at least one issues with using: md-content { -webkit-transform: translate3d(0, 0, 0); }
- position: fixed elements don't stay fixed anymore. e.g. FABs -- http://stackoverflow.com/questions/15194313/webkit-css-transform3d-position-fixed-issue
In my case md-content and any divs inside the tab have 0px height for some reason. The problem appears only on the first tab.
This is a iOS WebKit issue, WebKit/Apple need a MAJOR kick up the butt by multiple frontend libraries to give serious attention.
If Angular Material and Bootstrap both suffer from these flaws, then I think a larger group needs to be assembled to place more pressure on the team to expediate fixes so we aren't bloating GPU RAM as a workaround