Lej77 / tab-unloader-for-tree-style-tab

19 stars 4 forks source link

[Bug] #3

Closed perdolka closed 6 years ago

perdolka commented 6 years ago

Tab Unloader for Tree Style Tab - 4.0 Firefox - 60.0.1 (x64)

"Dim unloaded tabs" doesn't work when i use Alt + one mouse button click. The clicked tab is suspended but doesn't dimmed.

Temporary solution - double click on tab: Alt + double mouse button click

Same bug and solution with context menu.

Lej77 commented 6 years ago

This will occur if Tree Style Tab doesn't detect unloaded tabs correctly. The best solution would be to fix Tree Style Tab's code.

I can't reproduce this issue with a clean profile. I can get this issue when unloading the active tab after installing Auto Tab Discard. If that extension is disabled everything worked as it should again.

Do you have that extension installed or is it unrelated to your problem?

Lej77 commented 6 years ago

This pull request for Auto Tab Discard should fix the issue I observed.

Lej77 commented 6 years ago

My pull request was merged and released in Auto Tab Discard v0.2.5 so the latest version should no longer have that issue. Does this seem to fix your problem as well?

perdolka commented 6 years ago

Bug still exists. I also opened an issue for TST: https://github.com/piroor/treestyletab/issues/1903

Lej77 commented 6 years ago

@perdolka I suppose I could fix it by just calling the discard function twice. That would have the same effect as your temporary solution. I'll see about implementing that in the next version.

The issue is probably still that Firefox tells extensions that the tab is loaded even though it isn't. This seems to happen if a content script is sending a message when it is being unloaded and my pull request prevents one such message. It did fix the problem I observed though so I can't reproduce this issue anymore. If this is the reason for this issue then it would be quite hard to fix with in Tree Style Tab's code. If the problem is because of Firefox's tracking then I see two solutions. Either stop the message that is being sent when the tab is unloaded or call the discard function twice (once to unload the tab and another to fix the incorrect Firefox state).

When does tabs get in this incorrect state, is it only when you unload the current tab? Does it happen if you don't use Auto Tab Discard?

perdolka commented 6 years ago

Yes, It happen also, when I don't use "Auto Tab Discard" (disabled or uninstalled), only "Tab Unloader for Tree Style Tab" (or vice versa).

Only one addon doesn't have this bug - "Tab Unloader (WebExtension)". But it's NOT integrated into the TST context menu (I think that's the reason why it doesn't have this bug), and has a lot of another cons.

Lej77 commented 6 years ago

@perdolka I have released a new version (v5.0) that includes an option to unload tabs twice. To activate this option you need to open the options page and expand the Other Settings section. In it is an option called When unloading tabs use the unload method again after a slight delay (time in milliseconds) (-1 to disable). Set this option to something like 200 and it should hopefully fix your issue.

Lej77 commented 6 years ago

@perdolka In version 5.5 there is another fix for this issue. It is in the Fix for failed tab restore section and is called If the tab is incorrectly marked as loaded by Firefox then unload it again after a delay to mark it as unloaded. If the tab restore fix is active then this option will unload tabs again if they are incorrectly marked as loaded when they are unloaded. This is probably a more robust solution then the one I implemented previously and it should work for tabs that are unloaded by other extensions unlike my previous fix.