Closed Bug 1309347 Opened 5 years ago Closed 3 years ago

Flickering extension icon animation when using chrome.browserAction.setIcon()


(WebExtensions :: Frontend, enhancement, P5)

51 Branch


(Not tracked)



(Reporter: *moz, Unassigned)



(Whiteboard: triaged)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36

Steps to reproduce:

animate extension icon using chrome.browserAction.setIcon() in a loop

code is at;a=blob;f=lib/wallet/chromeBadge.ts
git clone git:// # lib/wallet/chromeBadge.ts

animation is running right after loading the extension

tested in firefox 50.0b4 and 51.0a2

Actual results:

animation is flickering

Expected results:

animation should not be flickering, just like in chrome/ium
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Summary: Flickering extension icon when animating it by passing ImageData to chrome.browserAction.setIcon() in a loop → Flickering extension icon animation when using chrome.browserAction.setIcon()
Component: Untriaged → WebExtensions: General
Product: Firefox → Toolkit
Animated images for toolbar buttons are intentionally not supported.
Closed: 5 years ago
Component: WebExtensions: General → WebExtensions: Frontend
Resolution: --- → WONTFIX
We have the following arguments for supporting this:

1) Compatibility. Chrome supports it, and we want to have the same look and feel for extensions across browsers.

2) We want users to know if our extension uses CPU (we do crypto) or the network (we have nothing to hide, and respect your privacy, so we don't "phone home", and if we do background work, we at least visualize it).
The animation is also very fast (we tested!) and not disruptive (the Taler logo is a T in a circle, and we put a tiny gap in the circle and move that around *while* the extension does work).
So while we agree that permanently flashing extension icons are not nice, they are sometimes (while an extension does work) useful indications to show the user that something is going on.

The extension we are developing is available for multiple browsers at

Edit: the correct web URL for the relevant code is
Resolution: WONTFIX → ---
For reference, the Chrome WebExtensions documentation specifically mentions "smooth animation" as a use case for icons, and also warns developers not to constantly animate the icon.
Priority: -- → P5
Whiteboard: triaged

Flickering badge icon. Badge icon is updated every 1 second. Flickers only on first animation sequence. Subsequent animation sequences won't flicker.
Product: Toolkit → WebExtensions
Duplicate of this bug: 1429750
Animated icons, in general, tend to be abused by extension developers as an attention-grabbing mechanism, leading to poor user experiences. In addition, the technical reason behind the flickering (multi-process communication) would require a fair amount of engineering work to fix. So while some extensions could (and would) potentially take advantage of this in an appropriate way, there is no desire within Firefox to support smooth icon animations at this time.
Severity: normal → enhancement
Closed: 5 years ago3 years ago
Resolution: --- → WONTFIX

Came across this thread while researching. For anyone needing flicker-free animated icons, consider inine svg animation. Working in FF88 👍

You need to log in before you can comment on or make changes to this bug.