Meta seems partially broken on old versions of iOS


(Allen) #14

I just checked and can repro this on my QA instance, which is running v2.2.0.beta6 +84. The exact same topic does not have this problem under my v2.2.0.beta5 +158 production forum. So it very much looks like a beta6 problem. However, if I upload an image to my beta6 instance, that works fine too. It seems to make a difference under which version it was baked. Will try uploading a test image here:

Edit: removed image again, it broke the topic. Weird that this worked on my QA instance…


#15

I tried to find a topic with lazy loading images in the MB Discourse I use and found one.
We are in 2.2.0.beta6 as well but I don’t have the bug there, whatever I try topic, lazy loading image post or later post. They all display OK with that same Ipad that cannot display the 3 broken test topics here.

Maybe I don’t know exactly what kind of topic I should search.

In case it’s important, here on meta where my Ipad displays 3 broken topcis, I use the Dark Theme.
Over there on MetaBrainz, where the Ipad had no issues with the example topic I found and linked above, I use the MetaBrainz style, Dark (WIP) theme (which is just a small derivate of the Dark Theme).

Also FWIW, talking about exotic devices, there is no issues with these topics on my Lumia 640 phone (Windows 10 Mobile).


(Robin Ward) #16

I believe @sam removed the line that checked if IntersectionObserver existed because we polyfill on IE. If we add that line back I think these problems would go away.


(Sam Saffron) #17

This is very odd… the polyfill should work unconditionally no?

Can you spot anything trivially wrong with the polyfill? I can test this later on the simulator I guess.


(Jeff Atwood) #18

My guess is that old versions of Safari are buggy here? ‘Yeah sure I can do that!’ But they can’t.


(Sam Saffron) #19

FYI, console is full of errors on iOS 8, which appears full of stuff that should not be there, we should not have require anywhere in our code, that is no good…

Possible something somewhere is leaning on some super recent feature in JS. Anyway I have a repro with browser stack and will debug this once I am on a fast enough network.


(Robin Ward) #20

My bad, I thought the polyfill was only included for IE. This seems to be something different.


(Jeff Atwood) #21

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.


(Sam Saffron) #22

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)


(Joffrey Jaffeux) #24

Yep, I can reproduce locally on my branch:

and not when switching to master


(Joffrey Jaffeux) #25

Got it! :cowboy_hat_face: :cocktail:

Long story short: ember 3 is using setPrototypeOf I added this file discourse/set-prototype-polyfill.js at b56c293540d8ebf9680f3773aa5379ede3a751e7 · discourse/discourse · GitHub before we load ember, and that seems to fix it.

(not deployed yet)

ping @eviltrout


(Joffrey Jaffeux) #28

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):


(Allen) #29

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


(Joffrey Jaffeux) #30

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

Let me try to fix this.


(Joffrey Jaffeux) #31

@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:

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");

(Sam Saffron) #32

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.


#33

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


(Jean-Michel) #34

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.


(Allen) #35

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


(Jeff Atwood) closed #36