It’s difficult to feature-detect a bug like this, so I think our only option is to check the user agent:
https://github.com/discourse/discourse/pull/17443