Skip to content
This repository has been archived by the owner on Mar 11, 2019. It is now read-only.

Firefox behaves badly #152

Open
ar7casper opened this issue Jan 28, 2016 · 3 comments
Open

Firefox behaves badly #152

ar7casper opened this issue Jan 28, 2016 · 3 comments

Comments

@ar7casper
Copy link

Hi,

Developed an extension using kango using 1.8.0.
Works great on Chrome & Safari, but FF is causing problems.
These are the problems I've found so far -

  1. Storage - I ran a test, saved some data on the content script to the storage. Checked that it was saved. Then, next time I open the extension, the data disappears....
  2. Messaging doesn't always work, when a tab is opened, everything works great, but when the user interacts with the UI and does an action that sends a message to the background, the messaging back doesn't work.

I'm still investigating, trying to figure out what's wrong, but I've ruled out problems related to my code.
(For instance, everything works great on Safari & Chrome)....

Are there any known issues that you know of?

Thanks.

@thekevinbrown
Copy link

That's odd. Firefox storage is working just fine for us in our extension. Are you saving async, or synchronously? In some contexts saving or retrieving Kango storage options wasn't working for us until we switched over to doing this:

http://kangoextensions.com/docs/api-reference/kango.html#kango.invokeAsync

e.g. it'd work in Chrome and FF but not Safari, or similar weird behaviour. I finally found this line in the docs:

Kango API available only in async mode (as in content scripts).

On this page: http://kangoextensions.com/docs/api-reference/kango-ui-optionsPage.html

@iamolivinius
Copy link

  1. Make sure you don't clear caches and/or history in Firefox on shutdown.
  2. This is how I do message passing with kango:

Background message listener
Background message handler
Content Script message source

Firefox tends to have weird behavior when it comes to using the window object as a global reference within content scripts. Another annoying fact is the Firefox frequently changes it's extensions API. (XUL, add-on SDK, now WebExtensions)

@thekevinbrown
Copy link

@iamolivinius, can you tell me more about FF's 'weird behaviour' with the window object from content scripts? We're seeing this: toolkit-for-ynab/toolkit-for-ynab#132

Basically for every other browser, hitting save on our options page then reloading the app will apply your updated settings. For FF, this isn't true until you open a new tab. The way features are loaded in is via the window object so I suspect this is the issue. Would love to know a good fix for this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants