Open elprans opened 4 years ago
We don't remove user styles, or reset styles on the page - in fact, we don't touch the original page's CSS at all! If the original content is being shown, this seems more likely to be a problem with Firefox, or with the user style extension being used, rather than a Browserpass issue.
When browserpass extension is installed a brief flash of originally-styled content is shown.
If this only occurs when the extension is installed, this isn't something that matters. Is that what you meant though? It seems odd to log a bug for a brief style flash that occurs only during installation, which is something most users only ever do once - so to clarify, can you explain what you mean by "installed"?
so to clarify, can you explain what you mean by "installed"?
I didn't mean "during installation", I meant that the flash only occurs if the browserpass extension is installed.
FWIW, I've been able to make it go away by commenting out updateMatchingPasswordsCount(tabId);
from the tab event listener. I suspect that the event handlers are probably handled sequentially, so browserpass effectively blocks stylus long enough for the unstyled flash to be rendered.
I didn't mean "during installation", I meant that the flash only occurs if the browserpass extension is installed.
OK, that makes sense - misunderstood you sorry.
FWIW, I've been able to make it go away by commenting out updateMatchingPasswordsCount(tabId); from the tab event listener. I suspect that the event handlers are probably handled sequentially, so browserpass effectively blocks stylus long enough for the unstyled flash to be rendered.
That is really useful info, thank you. I will see if I can reproduce that here, and if so whether shifting that code out of the main execution path of the event handler is sufficient to deal with it.
OK, so I was unable to reproduce this under normal conditions, but I was able to reproduce it when running a significant CPU hog at the same time (stress -c 16
on an i5-4258U), plus Chrome playing an embedded YouTube video in the background. I tested using Stylus as the userstyle extension. I tested using a blank page with one line of text on an HTTPS origin. The user style simply changed the page background colour.
There seems to be something a bit weird about Firefox's event handler implementation:
updateMatchingPasswordsCount(tabId)
call with console.log("something")
resolves the issue.setTimeout
does not resolve it, even though the timeout does not fire until after the issue has both occurred and resolved, and after the page has finished rendering and is displayed as it ought to according to the user style.That last point (8) is the strangest part of it all - there should be no additional load of any note caused by this handler until after the timeout fires, and yet the mere presence of the call is enough to trigger it.
@maximbaz - do you have any particular thoughts on this one? I'm confident that this is a Firefox problem, rather than some sort of bug in Browserpass. I cannot currently think of a reasonable strategy to mitigate it without removing the feature entirely.
Interesting investigation, and point 8 is indeed the strangest of them all!
I cannot think of anything else we can do, I dont think we should remove the functionality completely but we do have #103 to optionally disable the badge, shall we merge this into #103?
An option to turn off the badge icon seems like a good workaround.
General information
emerge browserpass
Exact steps to reproduce the problem
Install any style-customization extension (e.g. stylus, github-dark etc.)
Go to the styled site. When browserpass extension is installed a brief flash of originally-styled content is shown.
This started happening in FF 79 for me. Can be reproduced in the official beta for FF 80 on a fresh profile with only stylus and browserpass installed.