#12483 does not solve the problem for chrome on iOS
See original GitHub issuehttps://github.com/BabylonJS/Babylon.js/pull/12483
Both Chrome and Safari seem to be suffering from the problem with webgl2 and antialiasing. And It’s probably not limited to these two. since as I understand it iOS and iPadOS do not support other browsers, instead the browsers are simply wrappers around the WebKitView Engine.
Therefor we need to take into account many more userAgent strings.
Here are the different user agent strings for iOS and iPadOS for both chrome and safari for reference.
// iOS 15.4.1 Chrome 101
Mozilla/5.0 (iPhone; CPU iPhone OS 15_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/101.0.4951.44 Mobile/15E148 Safari/604.1
// iOS 15.4.1 Safari 15.4.1
Mozilla/5.0 (iPhone; CPU iPhone OS 15_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1
// iPadOS 15.4.1 Chrome 101
Mozilla/5.0 (iPad; CPU OS 15_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/101.0.4951.44 Mobile/15E148 Safari/604.1
// iPadOS 15.4.1 Safari 15.4.1
Mozilla/5.0 (iPad; CPU OS 15_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15H321 Safari/604.1
The problem lies with that the userAgent string for chrome looks different and does not match the regex we currently have.
Solution
I would suggest we do the match against the first part of the string instead since that looks the same in both and do an extra check that the engine is AppleWebKit.
also we don’t need the /g
flag since we are only looking for the first occurrence of the regex.
const fixYourBugsAlreadyRegexp = /OS\s(\d\d)_(\d).+AppleWebKit/;
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
got it! just saw the version signature, sorry. I’ll run a few tests on desktop OSX as well just to be sure. thanks
Ok, some desktop devices are affected by this issue. I’ll have to merge the two. will take care of that.