ttyridal / masterpassword-firefox

masterpassword for Firefox
GNU General Public License v3.0
33 stars 9 forks source link

Layout clipping UI #79

Closed borrrden closed 1 year ago

borrrden commented 2 years ago

Using version 95.0.2 but this has been happening for the past few versions. When I click on the addon button as I normally do all I see is a minimized line as if there is a window with no content. Clicking to close and then clicking again shows a bit more but it is clipped as in the following:

[edited by ttyridal, image removed. publishing the "verification" string is not ideal]

I don't see any way to scroll inside and so I cannot access the username or password counter anymore.

ttyridal commented 2 years ago

Hi,

My first guess is that this is something introduced with commit 557479f2 (css for android)

The version you're referring to does not match any masterpassword version - is it the Firefox version? Is your os windows, linux or mac?

Is your setup "different" by any means? Ie have you changed the default css of the browser? Do you have a particularly small display or using "small" browser windows? Other things you could think of?

The inconsistent behaviour puzzles me though.

If it pleases you, you could try to downgrade to beta2 by manually installing: https://addons.mozilla.org/firefox/downloads/file/3877573/masterpassword_for_firefox-2.9.0b2-fx.xpi

This version did not have the the changes for android.

borrrden commented 2 years ago

Sorry I mistakenly omitted Firefox from the version number. I’ll give the beta a shot because I don’t mess around with css changes or small displays or anything like that.

borrrden commented 2 years ago

The beta has normal layout. I should also mentioned that this same issue affects two separate machines for me :) .

EDIT Three actually, two windows and one mac. I think the CSS issue you pointed out is likely the culprit.

ttyridal commented 2 years ago

@borrrden This is really puzzling me. I develop on a mac, so I "know" it's working there 🤷‍♂️

Do you have other addons installed (and in particular addons that change the look of firefox, I guess..) What else can you tell me about your system(s) ?

I assume it's the same both from about:blank and various sites?

Does the window ever fully open?

borrrden commented 2 years ago

I do have other addons installed, including one (uBlock) that I think would likely alter page layout. I don't have many. On this particular machine:

Decantraleyes HTTPS Everywhere Privacy Badger uBlock Origin

about:blank is the same story and yes every site I access has the same behavior.

ttyridal commented 2 years ago

@borrrden

Ok, I still think I need your help on this one, as I'm not able to reproduce the behaviour.. If I force the android css, I do get something similar though.

Could you try to write/paste this in a browser console (menu: Tools->Browser Tools->Web Developer Tools), followed by enter.

window.matchMedia('(max-device-width: 640px)').matches

If that returns true it will select the android specific css, probably explaining the issue. And if your horizontal resolution is greater that 640, I'm confused 🙃

borrrden commented 2 years ago

I am unable to do this while the actual extension is "open". Will that be a problem? It returns false with it closed. Another angle of consideration is that I have a lot of privacy oriented settings on my Firefox to avoid oversharing information. Do you think there is something blocked there that could cause the CSS to lack some key piece of information when making its determination?

EDIT I learned how to debug an extension and force the window open, and in that case it returns true

borrrden commented 2 years ago

I found the setting in question that is messing with this: privacy.resistFingerprinting

https://discourse.mozilla.org/t/privacy-resistfingerprinting-true-causes-extension-popup-to-think-its-mobile/24080

ttyridal commented 2 years ago

Great debugging! :)

And yes, it makes a lot of sense to block device screen size queries to prevent fingerprinting..

Interesting observation that you get a different response in a random console (where it apparently works correct?) and in the addon console. My immediate thought is that it should be the other way around 🤷‍♂️ In my mind an addon is most likely deliberately installed and has a million other ways to track you anyway. I might try to open a bug on Firefox for that...

I have a fix for the window size, but you will have to live with a slightly smaller than intended font.

edit: https://bugzilla.mozilla.org/show_bug.cgi?id=1448848

borrrden commented 2 years ago

I have a suspicion that min-device-height is tracking min-height, and since this is an extension the min-height is always going to be tiny. If I use this CSS in a normal browser window (i.e. make the background one color if min-device-height is above X and another if it is below) then I can change the window size and observe the change in behavior. Anyway, thanks for the fix!

ttyridal commented 1 year ago

assume fixed in release v2.9.5 that have been available for the last 1.5 years. please reopen if not the case