Skip to content

Opera Mobile on Android not detected #15

Open
@maltesa

Description

@maltesa
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions