material icon indicating copy to clipboard operation
material copied to clipboard

md-tabs does not work on iOS : tab content disappears

Open tamsler opened this issue 11 years ago • 13 comments

  • 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

tamsler avatar Sep 04 '15 23:09 tamsler

Excellent. Thank you

ThomasBurleson avatar Sep 05 '15 03:09 ThomasBurleson

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

clshortfuse avatar Sep 06 '15 14:09 clshortfuse

Yes I have md-on-select defined.

tamsler avatar Sep 06 '15 16:09 tamsler

+1

guiporto avatar Sep 08 '15 01:09 guiporto

+1

omarmeky avatar Sep 08 '15 02:09 omarmeky

+1

gustavolima avatar Sep 08 '15 13:09 gustavolima

+1

blakemanzo avatar Sep 25 '15 02:09 blakemanzo

Also Chrome on iOS has the same issue. Tab content is not showing.

tamsler avatar Oct 27 '15 21:10 tamsler

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 ?

tourist avatar Oct 29 '15 23:10 tourist

After testing:

Good:

  1. Adding autoScroll class that forces -webkit-overflow-scrolling: auto to md-content as suggested in #2640 is fixing disapearing content on loading tab.
  2. In my case auto scroll also fixes issue with disapearing-apearing content durning scrolling what was another issue with touch version (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.

tourist avatar Oct 30 '15 01:10 tourist

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

tamsler avatar Feb 18 '16 17:02 tamsler

screen shot 2016-03-19 at 17 21 20 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.

kdomagal avatar Mar 19 '16 16:03 kdomagal

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

jpike88 avatar Mar 24 '16 03:03 jpike88