Mobile Safari on iOS crashes on big pages

后端 未结 7 1271
感情败类
感情败类 2020-11-30 22:49

I have a problem where Mobile Safari crashes when loading and manipulating the DOM with jQuery when the pages get too big.

I get the same problem on both iPhone and

7条回答
  •  没有蜡笔的小新
    2020-11-30 23:07

    I actually found the problem. It wasn't with JS as I thought, but with the CSS. I added class to make a CSS transition to fade in some elements. For anonymous users these elements had display: none; and probably never ran the opacity transition.

    The strange thing is that the transitions was on exactly two elements. So why would this only crash on long threads with 100+ comments?

    So the bottom line is: -webkit-transition crashed the page on mobile safari.

提交回复
热议问题