Meta seems partially broken on old versions of iOS

Yeah if we’ve accidentally used some weird super cutting edge JavaScript language feature that only exists in iOS 11 and greater that’s… not good. Strange that we don’t see breaks on IE11 though, if that’s the case.

1 Like

OK I did a tiny bit more digging @joffreyjaffeux this looks likely related to the ember upgrade. In iOS 8 it is error central in browserstack due to new JS features being used. My suspicion is that your branch has some places where a file is not being transpiled.

I tested local and it worked fine (for a very strange definition of fine, cause in iOS 8 you get no unprefixed flexbox and recently we moved our header to flexbox)

6 Likes

Yep, I can reproduce locally on my branch:

and not when switching to master

3 Likes

Got it! :cowboy_hat_face: :cocktail:

Long story short: ember 3 is using setPrototypeOf I added this file https://github.com/discourse/discourse/blob/b56c293540d8ebf9680f3773aa5379ede3a751e7/app/assets/javascripts/set-prototype-polyfill.js before we load ember, and that seems to fix it.

(not deployed yet)

ping @eviltrout

6 Likes

It’s deployed can you confirm meta.discourse.org is now loading for you please ?

It’s definitely loading on my sim though (but we have the css bug @sam mentionned):

4 Likes

Issue still the same on my side, but not sure you were asking me :slight_smile:

I see, this is a different issue. Seems like it’s also an ember3 issue.

Let me try to fix this.

2 Likes

@eviltrout This is not Ember 3 . I can reproduce on iOS 10 with any post containing an image on master.

This is due to this line in lazy loader lib:
https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/lib/lazy-load-images.js.es6#L27

I suggest the following change instead, but not sure, as I see you knew about removeAttribute and decided not to use it, so maybe you have a specific reason:

image.removeAttribute("data-small-upload");

https://github.com/discourse/discourse/pull/6815

8 Likes

Go ahead with that change, this is also on me, we tried to clean up the file so we are consistent with the way we handle attributes, I guess this is why people end up with jQuery, there are lots of fiddly things to remember in vanilla js.

6 Likes

Wow thanks! Those 3 topics are now showing their content on that iOS 9 iPad! :grinning:

4 Likes

Hello

One of my users have exactly the same issue with Ipad 2, version 9.3.5.
Blank messages when topics have many images.

I will try Joffrey Jaffeux’s patch and I tell you.

3 Likes

I confirm that the problematic Meta topic now renders correctly again on my iPad, many thanks! :grinning:

6 Likes