Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opera Mobile on Android not detected #15

Open
1 task done
maltesa opened this issue Aug 18, 2020 · 0 comments
Open
1 task done

Opera Mobile on Android not detected #15

maltesa opened this issue Aug 18, 2020 · 0 comments

Comments

@maltesa
Copy link

maltesa commented Aug 18, 2020

  • I'm submitting a ...

    • bug report
  • What is the current behavior?
    matcher.browser? returns false even though it is in my .browserlistrc

  • What is the expected behavior?
    matcher.browser? should return true

  • What is the motivation / use case for changing the behavior?
    The current behaviour seems incorrect

  • Please tell us about your environment:

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
    Seems to fail because of a whitespace:

    30: def browser?                                                                                                                                       
    31:   target_browser = user_agent[:family].downcase                                                                                                    
 => 32:   queries.key?(target_browser)                                                                                                                     
    33: end                                                                                                                                                
                                                                                                                                                           
[1] pry(#<BrowserslistUseragent::Match>)> target_browser                                                                                                   
=> "opera mobile"                                                                                                                                          
[2] pry(#<BrowserslistUseragent::Match>)> queries                                                                                                          
=> {"chrome"=>["81", "83", "81", "80"],                                                                                                                    
 "firefox"=>["68", "78", "77", "76", "68"],                                                                                                                
 "qqandroid"=>["10.4"],                                                                                                                                    
 "ucandroid"=>["12.12"],                                                                                                                                   
 "android"=>["81"],                                                                                                                                        
 "baidu"=>["7.12"],                                                                                                                                        
 "edge"=>["83", "81", "18"],                                                                                                                               
 "ios"=>["13.4-13.5", "13.3", "12.2-12.4"],                                                                                                                
 "kaios"=>["2.5"],                                                                                                                                         
 "operamini"=>["all"],                                                                                                                                     
 "operamobile"=>["46"],                                                                                                                                    
 "opera"=>["69", "68"],                                                                                                                                    
 "safari"=>["13.1", "13"],                                                                                                                                 
 "samsung"=>["12.0", "11.1-11.2"]}  

A potential solution could be to adjust the resolver.rb to handle opera mobile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant