Bug: Invalid Window Size in Firefox


#1

Hey.
I have an issue with Firefox if the about:config option “privacy.resistFingerprinting” is enabled. In that case the drop-down window has a random size at each opening. Sometimes large, sometimes small.


#2

IMHO it’s a feature from FF so the extensions can’t guess your screen size which is used for fingerprinting.


#3

We use the window’s screen size properties to determine the height of the window. I suspect @Crocmagnon is right here.


#4

I don’t know the technical details of Firefox but sites somehow determine the correct size of the Firefox client area. At least users need that the drop-down Bitwarden window has a proper size. When the window is too small (as on the screenshot above) it is very inconvenient to work.


#5

kspearrin
Can I hope this issue will be fixed?


#6

Judging from the silence the bug will not be fixed :sob:


#7

You would have to use a different metric to size the window to fix this, but Firefox is unlikely to provide one precisely because that is the purpose of the resistFingerprinting option.

Setting a static size would break compatibility and consistency between screen sizes.

Only way I can see a fix for this is to have a setting to manually set the window size.


#8

ShirokaiLon, the other Firefox extensions I have tested (including LastPass) do not have this issue. Only Bitwarden. Therefore, the issue has a solution if the developers wish. I hope that the developers will fix this. It’s a big obstacle to work.


#9

Spent a bit of time looking into it.

Looks like LastPass does not rely on the screen dimensions at all and instead uses a fixed width and scales the height to fit whatever contents need to fit in. Hence why the size stays the same. On the other hand I imagine that it doesn’t work well for small screen sizes.

Looks like ‘privacy.resistFingerprinting’ makes it so that Firefox reports screen size = window size.
Since Bitwarden’s window initially has a size of 0 it will pick the smallest window size the first time you open it. If you close the popup and immediately open it again, the size of the previous popup is remembered, which causes Bitwarden to pick the normal size window.
If you close the popup and do something else (click a link, switch tab, etc.) the size of the popup will be forgotten and the reported screen size will be set back to 0, resulting in the small window size again.

This means that you cannot have support for both small screens and resistFingerprinting without a manual setting to override the size.


#10

Can they set the min. size of the window so that it is not too small?


#11

A minimum size is already set. In fact, the two different sizes that you’re seeing can be considered the “small” and “normal” sizes for the popup.

Personally I don’t use Bitwarden on a low-resolution device, and I’m not sure how common that is. But it’s difficult to make a change that might break it for others by having the popup be too large for the screen.


#12

What low-resolution devices are you talking about? Does anyone else use screens 400x400 pixels.