Firefox WebExtensions misdetected as Chrome Packaged Apps #16068
Description
I'm submitting a ...
- bug report
- feature request
- other (Please do not submit support requests here (see above))
Current behavior:
In the current version of Firefox WebExtensions, window.chrome
and window.chrome.runtime
exist but window.chrome.app
does not. A check in $sniffer misdetects the application as a Chrome Packaged App. This in turn disables the HTML 5 History API support in the $location service causing unexpected behaviour elsewhere. In the case of our app it caused the $location service to try and redirect the browser to a hash-bangified version (/path/app.html
=> #!/path/app.html
) of the URL on startup, breaking the app.
Expected / new behavior:
The isChromePackagedApp
check referenced above should return false in an HTML page loaded from a Firefox WebExtension.
Angular version: 1.5.11
Browser: [Firefox 51]
Other information
A workaround for Firefox WebExtension authors is to set window.chrome.app
to a dummy object before Angular bootstraps so that the check does not produce a false positive.