opto/Expression-Search-NG

Breaks opening folders in new windows

Opened this issue · 5 comments

If I have Expression Search NG enabled and I right-click on a folder in my folder tree and select "Open in New Window", the new window that pops up is blank.
If I disable Expression Search NG the problem goes away.

opto commented

yes, on new tab (apparently also new window) Supernova now accesses the filter UI Elements in _bindUI before addons had a chance to add the filter UI to the DOM.

I thought that happened in new tab only - thanks for pointing me to this. As soon as I feel fit after a bike accident, I will fix this.

Works intermittently. Does not fully solve the problem, new window still sometimes fails to load with 4.0.26.

opto commented

yes, it was John's hunch that it might not be possible to reliably get into the window creation to kill the filter before TB uses its domId, where TB does not give the addon a chance to insert it into the DOM before TB tries to use it. At least the registerWindowListener from ExtensionCommon seems not always to be triggered early enough, according to your observation.

One could try whether services.wm.addlistener can add an eventhandler to the new window that is triggered before onload. I think John adds another onload, so the offending one from core code and his from ExtentionCommon might race against each other.

Here, the bug fix works always, but that probably strongly depends on computer speed and other unknown factors.

If it is a nuisance and opening new folders in tabs is not an option, then I recommend to deinstall Expression Search NG until TB has fixed this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1885525

opto commented

this version removes the filter on DOMContentLoaded, whereas TB tries to use it in loaded event. So hopefully, this is more reliable. I appreciate your comments from testing.

https://github.com/opto/Expression-Search-NG/releases/tag/v4.0.27