rthaut / deviantART-Filter

A browser extension that allows you to filter DeviantArt by user, keyword, and/or category.
https://rthaut.github.io/deviantART-Filter/
GNU General Public License v3.0
30 stars 1 forks source link

Minimum Firefox Version #143

Open rthaut opened 4 years ago

rthaut commented 4 years ago

With the release of v6.1.1, the minimum Firefox version was bumped to 62.

This is due to the way Firefox handled window.getComputedStyle() prior to version 62:

Before version 62 this function returned null when called on a Window with no presentation (e.g. an iframe with display: none; set).

The new quick filter modal (introduced in v6.1.0) uses an iframe that is initially hidden; that iframe has a React app that fails to render due this bug.

TypeError
columnNumber: 24492
fileName: "moz-extension://.../scripts/create-filters.js"
lineNumber: 8
message: "window.getComputedStyle(...) is null"

There might be other ways of implementing the new quick filter modal that do NOT have this problem (like waiting to inject the iframe until it is ready to be displayed?), or maybe there is a way to still render the React app correctly (perhaps a polyfill exists?) using the current method.

It it weren't for this problem, the minimum version of Firefox could most likely be set back to 55 (or maybe 57 to align with the Quantum release, which is when browser/web extensions became the only support extension type).

However, since Firefox 62 was released nearly three years ago, I'm not sure the effort to support versions prior to that is worthwhile.