Tab position
I switched to SelectionSK
, because I run into problems with Swift Selection Search
(the pop-up does not open). I have to say, that I like this SelectionSK
very much!
I have a similar request to #63: For Swift Selection Search
I have enabled: Open in new tab
and the tab is opened as child of the current tab. The same happens, if I middle click on a tab.
With SelectionSK
, the new tab is opened as last tab on the same level (which can sometimes be far away).
Is there a way to configure SelectionSK
, that the tab opened at the same position as used with the middle mouse button?
Firefox 94.0 (64-bit)
Linux Mint 20.2
SelectionSK 5.6, downloaded from Firefox's add-on page
Comments (11)
-
repo owner -
reporter Perhaps this is the reason for the current behaviour:
I use
Sidebery
` and have the following settings:- Position of new tab > Place new tab opened from another tab:
last child
- Place new tab (for other cases):
panel end
This results in the following behaviour:
- If I middle click on a link (or right click on it and choose
Open link in new tab
), the new tab is opened as a child and positioned at the end of already existing children. - If I open a new empty tab (
Ctrl-T
), a new tab is opened at the top level and positioned at the end. - If a tab is opened from an external program, it is opened at the top level and positioned at the end.
I select some text and click on a search engine. The tab is opened at the
panel end
and not aslast child
as I would expect.It looks to me, that
SelectionSK
opens a new tab not a child tab. Could that be the case for the somewhat unexpected behaviour? - Position of new tab > Place new tab opened from another tab:
-
repo owner Can you please disable 'Sidebery' for a moment and check how tabs are behaving?
Btw, API doesn’t have a concept of 'child' tab. New tab can be opened in any position, most common ones are next one or last one. Other extensions may override the behavior.
-
reporter I only installed
SelectionSK
and the tab gets opened next to existing tab (as it is done with a middle click on a link or from the right-click menuOpen Link in New Tab
).I know, that
Swift Selection Search
opens the search page next to the existing tab.Sideberry
also opens a new tab opened from another tab next to the existing tab, but if it opens a tab not from the existing tab as last tab.The only difference I can see, is that
Swift Selection Search
opens the new search tab from the currently active tab, butSelectionSK
as a plain new tab. Is that possible? -
repo owner So it is an issue with Sidebery. Will check if i can work around it.
-
reporter I might have found the cause of it … (but please bear in mind, that I do not know much about JavaScript and even less about programming for Firefox):
- This is, how
Sidebery
is dealing with opening the tab: https://github.com/CanisLupus/swift-selection-search/blob/5332ec2a70d0a3208033fff58941096b46bcb973/src/swift-selection-search.ts#L1387, but before that it sets theopenerTabId
option in https://github.com/CanisLupus/swift-selection-search/blob/5332ec2a70d0a3208033fff58941096b46bcb973/src/swift-selection-search.ts#L1376 - According to https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/create#parameters : ‘If specified, the opener tab must be in the same window as the newly created tab.’
- I
grep
ed throughSelectionSK
's source, but could not identify theopenerTabId
option anywhere.
Maybe it is just a matter to add this option to the call which opens the new tab?
- This is, how
-
repo owner Ok, will add it and release new version over weekend.
-
reporter Thanks, Andrey!
-
repo owner Version 5.7 was released, please try.
-
reporter So many thanks, Andrey! That looks good. I updated the add-on and now the new tab opens as child as set by
Sidebery
. -
repo owner - changed status to closed
- Log in to comment
SelectionSK always open a new tab next to the active tab (doesn’t make much sense to open it as a last tab). There is no logic in the code to open a new tab as a last one.
I guess there is an interference with some other extensions or OS\Browser specific behavior.
I checked the behavior in FF and Chrome on Win7 and Win10, works as expected. Will check MacOS later on.
Do you have Chome installed? If yes, can you please install SSK and check behavior under Chrome?