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

Fix sidebar app failing to load in Firefox extension. #460

Merged
merged 1 commit into from
Jun 26, 2017
Merged

Conversation

robertknight
Copy link
Member

I noticed a regression with the Firefox extension yesterday which makes it no longer usable. There are a couple of problems in the extension itself, but the main issue is that the sidebar app does not load properly, which is fixed by this hack.


Angular has a check for Chrome Packaged Apps in its $sniffer service
which changes the behavior of the $location service and in the Firefox
extension, triggers a redirect from /client/app.html to
/#client/app.html on startup, breaking the sidebar app.

This commit works around the problem by adding a fake
window.chrome.app object to convince Angular that the Firefox
extension is not a Chrome Packaged App.

Issue reported upstream at angular/angular.js#16068

Angular has a check for Chrome Packaged Apps in its `$sniffer` service
which changes the behavior of the $location service and in the Firefox
extension, triggers a redirect from `/client/app.html` to
`/#client/app.html` on startup, breaking the sidebar app.

This commit works around the problem by adding a fake
`window.chrome.app` object to convince Angular that the Firefox
extension is not a Chrome Packaged App.

Issue reported upstream at angular/angular.js#16068
@codecov
Copy link

codecov bot commented Jun 23, 2017

Codecov Report

Merging #460 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #460   +/-   ##
=======================================
  Coverage   89.87%   89.87%           
=======================================
  Files         127      127           
  Lines        5036     5036           
  Branches      865      865           
=======================================
  Hits         4526     4526           
  Misses        510      510

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 134aec5...90927d2. Read the comment docs.

@seanh
Copy link
Contributor

seanh commented Jun 26, 2017

I was able to reproduce the bug and Firefox, see comment on corresponding browser extension PR: hypothesis/browser-extension#41 (comment)

Copy link
Contributor

@seanh seanh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great debugging

@seanh seanh merged commit 539ce01 into master Jun 26, 2017
@seanh seanh deleted the ff-startup-fix branch June 26, 2017 10:30
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

Successfully merging this pull request may close these issues.

2 participants