Hi, @AlexVallat, thanks for your great addon, but something is annoying me: it can't copy session history to new tabs that are opened from script/other addon.

For example, tabs opened/created by gesture addons or drag&drop addons have empty session history.I open new tabs mostly by using gestures or dragging links so most opened tabs have no 'back track' session history for me

Can you hack "gBrowser.loadOneTab"? I think that one is called even for tabs created by script/addon.

Hi iByzod, thanks for the links. I'm afraid there's not much I can do to get Easy DragToGo working, just because of the way it works. FireGestures shouldn't be a problem, though. It isn't the intercepting of the new tab that's the issue, it's detecting of the parent tab. I'm currently doing this with the click event, but if a gesture is used, no click occurs.

I've released v0.16b2 into the development channel which uses mouseup instead of click. Should be pretty much the same, except that it will work for gestures too.

AlexVallat wrote:Hi iByzod, thanks for the links. I'm afraid there's not much I can do to get Easy DragToGo working, just because of the way it works. FireGestures shouldn't be a problem, though. It isn't the intercepting of the new tab that's the issue, it's detecting of the parent tab. I'm currently doing this with the click event, but if a gesture is used, no click occurs.

I've released v0.16b2 into the development channel which uses mouseup instead of click. Should be pretty much the same, except that it will work for gestures too.

Give it a go and let me if it does the job for you.

Wow I didn't expect a beta version comes out after waking up Thanks for your super fast hotfix!But there're still problems with drag&drop addons, since I didn't found your code repository, I'll post my reproduce steps here:

Step to Reproduce1. Create a new profile for Firefox 55beta1 build 5. 2. Install Firegesture (1.11.1)3. Install Backtrack tab history (0.16b2)4. Close Firefox, delete \startupCache\ folder in profile directory then open Firefox (this cache folder should be deleted for every restart later by default)5. Open https://www.reddit.com/r/firefox/ as tab A, click `Next` link at the bottom of the page two times, your session history should be like this:6. Middle click on `Next` to open a new reddit tab B in the background, switch to tab B, it 'remembers' the original history:7. Open tab C & tab D with Firegesture (normal gesture & keypress gesture, shown in the gif below), their history is the same as above, it works8. Install Drag & DropZones (Revived) (0.1.2)9. Close Firefox, delete \startupCache\ folder in profile directory then open Firefox10. Config Drag & DropZones to add a `open links` zone:11. Repeat step 5~7, plus step 1212. Open tab E with Drag & DropZones, by draging the `Next` link to the `Open Link` zone.

Expected Result1. Tab A have 3 history entries, tab B~E have 4 history entries-------tab A------------------tab B~E

Actual Result1. Tab A have 3 history entries, tab B~E have 1 history entries (itself)2. Tab B~D still have only 1 history entries even after Drag & DropZones is uninstalled-------tab A------------------tab B~E

If you need more information please reply to this thread or contact me directly (byzod#live.com, replace # with @), thanks!

The "dragend" event does not fire "mouseup", so drag operations are not triggering the parent setting behaviour. I'm trying to think whether there is any risk of unwanted behaviour by allowing dragend to act the same as mouseup for setting a tab as parent, but I think it's probably OK. I've uploaded v0.16b3 with "dragend" event listening added.

AlexVallat wrote:The "dragend" event does not fire "mouseup", so drag operations are not triggering the parent setting behaviour. I'm trying to think whether there is any risk of unwanted behaviour by allowing dragend to act the same as mouseup for setting a tab as parent, but I think it's probably OK. I've uploaded v0.16b3 with "dragend" event listening added.

Thanks for your update! So tabs opened by Firegesture is impossible to inherit the history? Anyway, 0.16b3 works for Drag & DropZones (the test addon), but still not working on my in-use drag&drop addon.It's a legacy addon, I know it will die soon in fx 57, but I really hope you could spare some time taking a look into it because I'm staying with Fx 56 for a while. Thank you so much!

Step to reproduce1. Repeat step 1~5 in the former post2. Install userChromJS v2.0, you may need to disable the signature check to install it (add an entry in about:config, xpinstall.signatures.required = false)3. Install DragToGo.uc.js by copy it to userChrome folder in your profile directory (typically `{profile folder name}\Chrome\`). Then add one line in userChrome.js (`{profile folder name}\Chrome\userChrome.js`):

4. Close Firefox, delete \startupCache\ folder in profile directory then open Firefox5. In tab A, open tab F by draging the `Next` link to the right (open in background) or left (open in foreground) then release in 300ms (can be changed in the line 24 of DragToGo.uc.js)

Expected Result1. Tab A have 3 history entries, tab F have 4 history entries-------tab A------------------tab F

Sorry, but that's completely horrible. I tried installing it, and it's borked my profile so badly I can't even open the browser toolbox to try and debug it. My best guess is that its intercepting the drag events in a way the prevents them from being seen or processed by anything else, including BackTrack Tab history. I'm not willing to do any more work to try and support this hack, sorry.

AlexVallat wrote:Sorry, but that's completely horrible. I tried installing it, and it's borked my profile so badly I can't even open the browser toolbox to try and debug it. My best guess is that its intercepting the drag events in a way the prevents them from being seen or processed by anything else, including BackTrack Tab history. I'm not willing to do any more work to try and support this hack, sorry.

Regarding the non-transition to WebExtensions: did anyone try asking Mozilla for the necessary API/s so the new implementation would be doable?I'm asking because FireTitle, another Firefox add-on, managed to get their API needs considered and implemented (I opened the bug report that triggered it!). Took some discussing and it's not finished yet, but at least now there is a partially functional FireTitle working on WebExtensions. So... maybe something similar could be done for BackTrack Tab History?

There are a couple of issues in Bugzilla: 1321365 and 1270782. One of which is explicitly WontFix, and the other appears abandoned. I think the problem is that Mozilla's policy is that they do not want addons which modify the existing browser UI or functionality, so BackTrack Tab History is not going to be welcome.

So I would say there is pretty much zero chance of this ever being a WebExtension.

I will, however, continue to make every effort to ensure it's continued compatibility with unrestricted versions of Firefox, which honour the extensions.legacy.enabled preference. That's the blue versions, Developer, Nightly, or Unbranded. With any of those, use about:config to set extensions.legacy.enabled true and BackTrack Tab History will work.

Alex

Last edited by AlexVallat on November 9th, 2017, 1:43 am, edited 1 time in total.