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

Add support for FireFox #2350

Closed
jniles opened this issue Dec 6, 2017 · 4 comments
Closed

Add support for FireFox #2350

jniles opened this issue Dec 6, 2017 · 4 comments

Comments

@jniles
Copy link
Collaborator

jniles commented Dec 6, 2017

Mozilla has been the traditional champions of the free web and we were originally planning on using FireFox in Kiosk mode to limit a user's ability to mess with their machine. However, the last few years of FireFox's growth were not encouraging.

Good news though, FireFox is now cool again! It looks like Mozilla is channeling a lot of work into the browser, and we can expect speed and stability in the future.

For this reason, I propose that we investigate adding support for FireFox. Here's how we would make that happen:

  1. Go through most functionality on FireFox and document breaking issues. We already know that the print() method is broken on embedded frames ... but what else works/doesn't work? Each issue we find should be reported on Github with the "FireFox" label.
  2. Fix the reported issues.
  3. Enable protractor builds using FireFox.
  4. Enable Travis CI testing using FireFox.

Once all these are done, we'll be able to reliably say we support both major browers. Chances are, if the application works on both FF and Chrome, it will likely work in MS Edge too!

@jniles
Copy link
Collaborator Author

jniles commented Apr 5, 2018

Well, it looks like we won't have a lot of luck with this without severely modifying our server, which is a shame.

This boils down to two issues:

  1. Allowing scripts to load content from cross domains. We can do this with the cors module in expressjs.
  2. A pretty significant bug in FireFox. There's no work around for this besides embedding JS in the PDF and hacking on it a bit.

Guess we'll let another six months go by before trying again.

jniles added a commit to jniles/bhima that referenced this issue Apr 5, 2018
This commit uses the $onDestroy() hook of angularjs components to clean
up the event handlers for printing.  It also defers the load() event to
prevent FireFox from automatically attempting to print the window before
any PDFs are loaded.

Note that the print() function is still broken in FF, but this allows
you to preview modules without print() calls suddenly hijacking the
session.

Partially addresses IMA-WorldHealth#2350.
jniles added a commit to jniles/bhima that referenced this issue Apr 5, 2018
This commit uses the $onDestroy() hook of angularjs components to clean
up the event handlers for printing.  It also defers the load() event to
prevent FireFox from automatically attempting to print the window before
any PDFs are loaded.

Note that the print() function is still broken in FF, but this allows
you to preview modules without print() calls suddenly hijacking the
session.

Partially addresses IMA-WorldHealth#2350.
jniles added a commit to jniles/bhima that referenced this issue Apr 5, 2018
This commit uses the $onDestroy() hook of angularjs components to clean
up the event handlers for printing.  It also defers the load() event to
prevent FireFox from automatically attempting to print the window before
any PDFs are loaded.

Note that the print() function is still broken in FF, but this allows
you to preview modules without print() calls suddenly hijacking the
session.

Partially addresses IMA-WorldHealth#2350.
jniles added a commit to jniles/bhima that referenced this issue Apr 5, 2018
This commit uses the $onDestroy() hook of angularjs components to clean
up the event handlers for printing.  It also defers the load() event to
prevent FireFox from automatically attempting to print the window before
any PDFs are loaded.

Note that the print() function is still broken in FF, but this allows
you to preview modules without print() calls suddenly hijacking the
session.

Partially addresses IMA-WorldHealth#2350.
bors bot added a commit that referenced this issue Apr 5, 2018
2664: fix(bhPDFPrint): anticipate memory leak r=mbayopanda a=jniles

This PR cleans up the bhPDFPrint by removing unused bits and migrating to modern JS.

This commit uses the $onDestroy() hook of angularjs components to clean up the event handlers for printing.  It also defers the load() event to prevent FireFox from automatically attempting to print the window before any PDFs are loaded.

Note that the print() function is still broken in FF, but this allows you to preview modules without print() calls suddenly hijacking the session.

Partially addresses #2350.
@jniles jniles removed their assignment May 4, 2018
@Scholldier
Copy link
Contributor

Scholldier commented Sep 16, 2018

@jniles Just curious -- I use FireFox on my Ubuntu VM and haven't experienced any issues that I would attribute to Firefox. Although, to be fair, I haven't done any printing or heavy use. It's also been close to 6 months since your last post -- has the issue you linked been fixed?

@jniles
Copy link
Collaborator Author

jniles commented Sep 16, 2018

Hi @Scholldier! Welcome back :)

The system is usable on FF for the most part, but the print issues make training hard. Basically, the bug revolves around the inability to tell embedded PDFs that they should be printed. Typically we have a large button that says "Print" (since we can translate this) which we tell all users to click to print. In FF, this functionality is broken (bug report here). This makes training unacceptably confusing for users.

So currently ... you can kind of use Firefox if you know what you are doing. You can still print, just not with our button telling you to print. Basically, FF will work for "super users" not for computer-illiterate users.

@jniles
Copy link
Collaborator Author

jniles commented Jul 3, 2020

This now works! It looks like the bug in FF got closed about four months ago.

Ref: https://bugzilla.mozilla.org/show_bug.cgi?id=874200.
Ref: https://bugzilla.mozilla.org/show_bug.cgi?id=911444

@jniles jniles closed this as completed Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants