Skip to content

user agent match for Edge is not correct in platform.js #115

@jessegreenberg

Description

@jessegreenberg

Noticed while working on #90, the user agent for Edge is
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.0.0 Safari/537.36 Edg/100.0.0.0'

but platform.js is looking for "Edge".

phet-core/js/platform.js

Lines 82 to 83 in e3a8916

// Whether the browser is Microsoft Edge
edge: !!ua.match( /Edge\// ),

Replacing with "Edg" fixes it. There are two usages of platform.edge in the project, both are platform workarounds in scenery. Maybe they probably aren't necessary anymore if the platform.edge checks haven't been working.

@jonathanolson do you have a recommendation for how to proceed?

Metadata

Metadata

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