You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Case B: The browser on iOS didn't report as safari, so we use the iOS version as a proxy to the browser version. This is based on the assumption that the underlying Safari Engine used will be atleast equal to the iOS version it's running on.
However the condition used for this is simply
ifagent.os.family == 'iOS'
As such, whether the browser identifies as Safari or not, the version number is set to the os version; making Case A redundant,
The comment would seem to suggest that there should be logic that is specifically checking for the absence of Safari;
if !agent.family.include?('Safari') && agent.os.family == 'iOS'
As background, this stems from the following real-world example;
ua='Mozilla/5.0 (iPad; CPU OS 12_5_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.2 Mobile/15E148 Safari/604.1'matcher=BrowserslistUseragent::Match.new(['ios_saf 12.2-12.5'],ua)matcher.browser? && matcher.version?(allow_higher: true)=>true
Where although it is Safari and iOS, it is replacing the browser version 12.1.2 with the os version 12.5.6 and returning a match.
This potentially doesn't match the expectation based on the Case B comment.
The text was updated successfully, but these errors were encountered:
This is potentially a bug, or some imprecision/ambiguity in one of the code comments.
There are two cases related to resolving the iOS version within
resolver.rb
browserslist-useragent-ruby/lib/browserslist_useragent/resolver.rb
Lines 20 to 34 in f17624b
Case B explains;
However the condition used for this is simply
As such, whether the browser identifies as Safari or not, the version number is set to the os version; making Case A redundant,
The comment would seem to suggest that there should be logic that is specifically checking for the absence of Safari;
As background, this stems from the following real-world example;
Where although it is Safari and iOS, it is replacing the browser version
12.1.2
with the os version12.5.6
and returning a match.This potentially doesn't match the expectation based on the Case B comment.
The text was updated successfully, but these errors were encountered: