firegestures icon indicating copy to clipboard operation
firegestures copied to clipboard

Focus Last Tab gesture in Get Script doesn't work

Open bottleblue opened this issue 10 years ago • 2 comments

In the Get Scripts section (http://www.xuldev.org/firegestures/getscripts.php) the gesture "Focus Last Tab" does not work reliably. Sometimes it will work and sometimes it will close all your tabs except for one.

Also the "Focus Last Selected Tab" gesture doesn't work reliably either. Sometimes it works and sometimes it does nothing.

Can someone update the gestures' codes?

bottleblue avatar Nov 15 '14 18:11 bottleblue

Here is Focus Last Selected Tab reliable code:

if (ctrlTab) {
  // last active tab
  ctrlTab.open();
  ctrlTab.pick();
} else {
  // tab on the left
  gBrowser.tabContainer.advanceSelectedTab(-1, true);
} 

and Focus Before Last Selected Tab, as a bonus:

if (ctrlTab) {
  // before last active tab
  ctrlTab.open();
  ctrlTab.advanceFocus(true);
  ctrlTab.pick();
} else {
  // second tab on the left
  gBrowser.tabContainer.advanceSelectedTab(-1, true);
  gBrowser.tabContainer.advanceSelectedTab(-1, true);
} 

Please change/add.

sergwish avatar May 28 '15 20:05 sergwish

It doesn't work. It says "gesture failed: (TypeError: this.tablist is null)

bottleblue avatar May 30 '15 19:05 bottleblue