New Safari <10.1 compatibility issue [resolved]

A forum member reported that she was unable to access https://se23.life this morning on her iPad. In the logs there are lots of errors regarding “e.getRootNode is not a function”. I asked her to try in safe mode and when she did, the problem persisted (so I don’t think this problem relates to plugins or customisation)

The stack trace identified in the error is Ke@https://se23.life/assets/ember_jquery-a40c13c332a81d765d3281335e4a756ef34f0d72a592a96b7e7b37b02232

The user agent is “Mozilla/5.0 (iPad; CPU OS 10_2 like Mac OS X) AppleWebKit/602.3.12 (KHTML, like Gecko) Version/10.0 Mobile/14C92 Safari/602.1”

Is it possible the version of Safari is the problem?

I note on the getRootNode browser compatibility matrix, it was only supported since version Safari version 10.1, and the user agent indicates version 10

2 Likes

Okay I’ve done some more digging in the Discourse code base.

I found one reference to getRootNode, and it was added six days ago by @joffreyjaffeux (no personal blame intended by my post). The file is vendor/assets/javascripts/jquery.js (note that you may need to click to expand in the github diff as it’s a large file)

https://github.com/discourse/discourse/commit/9f07ced6989d93fd3c68ca5a985e50bd1234b625#diff-18de83a8bb7b63c7f40207000cf6984c

I believe this change has inadvertently affected backward compatibility with older browsers that we might hope that Discourse would continue to support (the user in my case was using an iPad Mini 2 running iOS 10.2, which is by no means prehistoric)

3 Likes

Yes it’s a bug of jQuery 3.4 which is supposed to support this version of safari.

Looks like it’s been fixed 3 days ago: https://github.com/jquery/jquery/commit/7dddb19ca4bca9685adb734c76dcf72c3f610007

And jquery 3.4.1 jQuery 3.4.1: triggering focus events in IE and finding root elements in iOS 10 | Official jQuery Blog just has been released, will update it.

3 Likes

Excellent, thank you!

1 Like

Will be fixed by:

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

Thanks for report

7 Likes

This topic was automatically closed after 6 hours. New replies are no longer allowed.