[Ext] BackTrack Tab History

Announce and Discuss the Latest Theme and Extension Releases.
Post Reply
AlexVallat
Posts: 90
Joined: September 30th, 2006, 8:53 am

Re: [Ext] BackTrack Tab History

Post by AlexVallat »

Hmm. Github -> Gist is working OK for me. The Gist link at the top of the page. Could you try on a clean profile, just to make sure it isn't some other add-on interfering? If it still isn't working on a clean profile, please let me know which version of Firefox you are using, and if you noticed it stopped working after upgrading.
User avatar
Str0ngwun
Posts: 222
Joined: January 29th, 2011, 9:50 am

Re: [Ext] BackTrack Tab History

Post by Str0ngwun »

Oh, turns out it's e10s that breaks the addon, sorry, shouldn't have posted.
muflax
Posts: 2
Joined: April 23rd, 2016, 12:40 am

Re: [Ext] BackTrack Tab History

Post by muflax »

If I open a link using VimFX through a link hint, the history isn't preserved. It works with the old Tab History Redux.

I also filed the bug on VimFX's bug tracker.
AlexVallat
Posts: 90
Joined: September 30th, 2006, 8:53 am

Re: [Ext] BackTrack Tab History

Post by AlexVallat »

The issue here is that VimFX is opening the link by directly creating a new tab with that URL (using loadOneTab). That's fair enough, but it means that BackTrack has no way of knowing that it's supposed to be following a link, rather than just a new tab that's been created. I don't want to just copy the history onto every new tab that's created, as for many operations that's doesn't make sense. For example with VimFX, if you use the one of the new tab shortcuts you would not want it to copy the history, but if you use the follow link shortcut then you would.

BackTrack currently hooks handleLinkClick (or contentAreaClick under e10s) to determine the tab whose link was clicked. I know it's not ideal, and if there's any better way to determine that A) a link has been followed and B) which tab that link belonged to, then I'm open to suggestions.
muflax
Posts: 2
Joined: April 23rd, 2016, 12:40 am

Re: [Ext] BackTrack Tab History

Post by muflax »

Thanks for the useful feedback! VimFX now uses a compatible method.

And thanks for keeping the proud traditions of tab history workarounds alive! :)
avada
Posts: 1932
Joined: February 10th, 2008, 6:30 am
Location: Hungary

Re: [Ext] BackTrack Tab History

Post by avada »

While passing on the history works fine and I can view it with a right click most of the time the back/forward buttons stay dimmed and don't do anything if I left click them.
What might be the cause of this,
AlexVallat
Posts: 90
Joined: September 30th, 2006, 8:53 am

Re: [Ext] BackTrack Tab History

Post by AlexVallat »

I've submitted an updated version (0.9) which should resolve the button enabling issue, and some other compatibility fixes required by changes in newer Firefox versions. Once it gets through review, please let me know if you are still having trouble with dimmed buttons.
avada
Posts: 1932
Joined: February 10th, 2008, 6:30 am
Location: Hungary

Re: [Ext] BackTrack Tab History

Post by avada »

AlexVallat wrote:I've submitted an updated version (0.9) which should resolve the button enabling issue, and some other compatibility fixes required by changes in newer Firefox versions. Once it gets through review, please let me know if you are still having trouble with dimmed buttons.
I installed it manually. Didn't see any dimmed buttons so far.
Thanks for the update!
avada
Posts: 1932
Joined: February 10th, 2008, 6:30 am
Location: Hungary

Re: [Ext] BackTrack Tab History

Post by avada »

I think there's a bug. If I click a link with the left mouse button and it opens in a new tab then it won't inherit the history. But if I click it with middle click the new tab will inherit the history.
AlexVallat
Posts: 90
Joined: September 30th, 2006, 8:53 am

Re: [Ext] BackTrack Tab History

Post by AlexVallat »

avada wrote:I think there's a bug. If I click a link with the left mouse button and it opens in a new tab then it won't inherit the history. But if I click it with middle click the new tab will inherit the history.
It depends on how the specific link works. If it specifies a target then it should work, but if it uses javascript then it won't (because I can't reliably determine the owner-tab of a tab opened by a script). If you have an example that you'd like me to look at, then please give me the link.
avada
Posts: 1932
Joined: February 10th, 2008, 6:30 am
Location: Hungary

Re: [Ext] BackTrack Tab History

Post by avada »

AlexVallat wrote:
avada wrote:I think there's a bug. If I click a link with the left mouse button and it opens in a new tab then it won't inherit the history. But if I click it with middle click the new tab will inherit the history.
It depends on how the specific link works. If it specifies a target then it should work, but if it uses javascript then it won't (because I can't reliably determine the owner-tab of a tab opened by a script). If you have an example that you'd like me to look at, then please give me the link.
I tried the link in this article: https://prohardver.hu/hir/seagate_backu ... o_hdd.html
It seems like plain html to me.
AlexVallat
Posts: 90
Joined: September 30th, 2006, 8:53 am

Re: [Ext] BackTrack Tab History

Post by AlexVallat »

avada wrote:I tried the link in this article: https://prohardver.hu/hir/seagate_backu ... o_hdd.html
It seems like plain html to me.
Ah, I think I see what's happening. That is a link to open in a new window, but you must have a setting turned on that makes new windows open in new tabs instead. I think it ought to be possible to handle that case, I'll look into it. Thanks.
avada
Posts: 1932
Joined: February 10th, 2008, 6:30 am
Location: Hungary

Re: [Ext] BackTrack Tab History

Post by avada »

AlexVallat wrote:
avada wrote:I tried the link in this article: https://prohardver.hu/hir/seagate_backu ... o_hdd.html
It seems like plain html to me.
Ah, I think I see what's happening. That is a link to open in a new window, but you must have a setting turned on that makes new windows open in new tabs instead. I think it ought to be possible to handle that case, I'll look into it. Thanks.
Indeed.

(Also if links opening in a window are not handled in general, I think they should be.)
AlexVallat
Posts: 90
Joined: September 30th, 2006, 8:53 am

Re: [Ext] BackTrack Tab History

Post by AlexVallat »

I've investigated this now, and unfortunately I won't be able to support links with targets in newer versions of Firefox for the same reason that I had to stop supporting links in new windows. Firefox has changed the way these are handled so that instead of opening the link in the new tab or window it first opens a new blank tab or window, and then (somehow) replaces the contents of that tab with the true destination. So if BackTrack copies the history into the newly created tab or window, it then gets thrown away when the tab contents are replaced. It's something to do with e10s, I think.

I'm not sure if it's going to be possible to work around this, to be honest.
AlexVallat
Posts: 90
Joined: September 30th, 2006, 8:53 am

Re: [Ext] BackTrack Tab History

Post by AlexVallat »

OK, I've thought of an alternative mechanism that might work. Rather than trying to intercept the creation of new tabs, I've implemented the following behaviour:

If a new tab (or window) is spawned within 500ms of a click event then the new tab is regarded as a child of the one clicked on. This should allow it to work with links with targets, or even javascript links.

Of course it also has plenty of potential for misidentification, so if anyone would like to give this a try for me and let me know how successful it is, that would be appreciated:

https://addons.mozilla.org/en-US/firefo ... ons/0.13b3

If you get a new tab that does not inherit the history when you thought it ought to, please check the browser console (Ctrl+Shift+J) and look for a line like "BackTrack:Frame:No parent to copy history from. Last parent seen n[/n] ms ago". That will give a clue as to whether it just didn't register the click event in the parent tab, or if it delayed too long opening the new tab to count as associated.
Post Reply