Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double Click to Close Tabs? #898

Open
DaveH1 opened this issue Sep 14, 2024 · 18 comments
Open

Double Click to Close Tabs? #898

DaveH1 opened this issue Sep 14, 2024 · 18 comments
Labels
enhancement New feature or request

Comments

@DaveH1
Copy link

DaveH1 commented Sep 14, 2024

Thorium has a 'Double Click to Close Tab' flag built in, which is missing in Supermium.
Is there any chance of adding it?
It's a small thing, but something I got very used to using in 360Chrome on Windows XP, where it's a standard setting.
It would encourage me to use Supermium as my default browser on XP!
There is a 'Chrome Plus' add-on with will give that facility in Chrome, but it doesn't work in XP.
Thanks, Dave.

@DaveH1 DaveH1 added the enhancement New feature or request label Sep 14, 2024
@oleedd
Copy link

oleedd commented Sep 15, 2024

It is very easy to write a working extension for this. Unfortunately, publishing extensions in Chrome Web Store requires money.

@DaveH1
Copy link
Author

DaveH1 commented Sep 15, 2024

Thanks, but Thorium just has it as a built-in flag, no extension needed.
When I asked Alex, the Thorium developer, about it, he added it to the next version, so I got the impression that it wasn't that big a deal to do, although I realise that this may not actually be the case of course!

@oleedd
Copy link

oleedd commented Sep 15, 2024

The thing is the description of Supermium says: "If there's a feature you want, which cannot be replicated by a Manifest v2/v3 extension, please ask!".

@DaveH1
Copy link
Author

DaveH1 commented Sep 15, 2024

Yes, but why have to use an extension if it can be added to the browser natively, as Thorium (and 360Chrome) prove that it can be?
Any thoughts @win32ss ?

@oleedd
Copy link

oleedd commented Sep 15, 2024

Why? Because if all extensions features like this will be inside, the code will be very big.

@DaveH1
Copy link
Author

DaveH1 commented Sep 15, 2024

I'm really not quite sure why you seem to have such a problem with this.
Anyway, it's @win32ss who has to make the decision, I was only asking him.

@IDA-RE-things
Copy link

Please find the commints or lines of code in Thorium repo, referencing this feature.
I think the code will be very simple.
Then adding this feaure will be few minutes to merge.

@DaveH1
Copy link
Author

DaveH1 commented Sep 15, 2024

Thanks, that's really good to hear!
I do hope that @win32ss thinks that it's an option worth including in the next update of Supermium.
Cheers, Dave.

@win32ss
Copy link
Owner

win32ss commented Sep 15, 2024

I do agree that it should be added. Even without Thorium's equivalent feature, I already added a feature from ungoogled-chromium which prevents the closing of the last tab. That could've probably been adapted to make this feature as well.

@oleedd
Copy link

oleedd commented Sep 15, 2024

Double click is also used to select a word. Not sure if it is possible to differ these two cases.

@DaveH1
Copy link
Author

DaveH1 commented Sep 15, 2024

In Thorium double-clicking to select a word in text still works, double-clicking on a tab closes it, so there's no clash.
The option to prevent the closing of the last tab closing the browser is absolutely essential as far as I'm concerned.
I have never understood why the developers of 'official' Google Chrome have always refused to include that!

@IDA-RE-things
Copy link

Its double click to the tab header (360Chrome & Thorium behaviour). So its can be differentiated from other doubleclicks.

In order not to reinvent the wheel, it is better to look at Throium, if it is already implemented there.

@oleedd
Copy link

oleedd commented Sep 15, 2024

double-clicking on a tab closes it

On a tab? But you have "x" on a tab to close. I thought that it is about clicks on pages to not go up. I don't see any sense then. Also: does it work for background tabs (one click makes a tab active)?

I have never understood why the developers of 'official' Google Chrome have always refused to include that!

Because they don't care about users and their convenience. They have cut out trapezoidal tabs from the code in Chrome 71 spitting in the face of users. Supermium still doesn't have those tabs, only very small ones. Interesting that no borders in that tab version.

@DaveH1
Copy link
Author

DaveH1 commented Sep 15, 2024

double-clicking on a tab closes it

On a tab? But you have "x" on a tab to close. I thought that it is about clicks on pages to not go up. I don't see any sense then. Also: does it work for background tabs (one click makes a tab active)?

Sorry, I really don't see what your problem is with this.
We're talking about a flag which can be enabled or disabled as you wish, and I assume will be disabled by default.
Nobody's telling you that you have to have double-clicking to close tabs enabled, it will be your choice!
It's an optional convenience for those like me who like it, nothing more.

@oleedd
Copy link

oleedd commented Sep 15, 2024

I understood, it is probably difficult to hit "x" by the cursor for some people. Ok.

@DaveH1
Copy link
Author

DaveH1 commented Sep 15, 2024

I personally have no problem with that at all, I just find it easier and quicker to double-click anywhere on the tab.

@Vangelis66
Copy link

@DaveH1 wrote:

When I asked Alex, the Thorium developer, about it, he added it to the next version,
so I got the impression that it wasn't that big a deal to do

Hi 😄 ; are you sure you're not confusing this with "Always open bookmarks in a new tab" request of yours? I've searched in vain for your ticket inside all possible Thorium trackers, but I could only find this 😉 ... Further research also showed that this Thorium feature was first implemented in its M110 release (see below), well before any support for XP materialised....

@IDA-RE-things wrote:

In order not to reinvent the wheel, it is better to look at Thorium, if it is already implemented there.

... Well, that wasn't an easy thing to do 😞 ; the feature first appeared in its M110 release:

https://github.com/Alex313031/Thorium-Win/releases/tag/M110.0.5481.178

Added four new chrome://flags flags:
...
– chrome://flags/#double-click-close-tab - A flag that gz83 came up with and we both implemented. Allows you to close a tab by simply double-clicking on it, similar to an option in Vivaldi.

This was on 20230304, one and a half year ago; searching through commit logs proved difficult, because commit titles/descriptions are generally non-indicative of the code involved; plus, development is scattered across several repos (Linux, Win10+, "legacy" Win, i.e. < 10) ...

Starting point was this PR below:

Alex313031/thorium#110

inspired by a Brave feature:

bigfoxtail/brave-core@acec5ef

To make matters more difficult, the PR was not merged after review but instead closed; however, the code from the PR was modified by the Thorium author and then added as part of some "M110 finalize" squashed commit:

Alex313031/thorium@212a7ac

in later commits, some relevant files were rearranged/optimised, but I was too obtuse to write those down 😄 ; I believe that same code was, more-or-less, transferred across subsequent Th releases, thus found its way inside the M122 "legacy" release that DaveH1 is currently using in his XP partition...

For me, this specific feature is not one I'm after, though 😜 ; having always used 3-button mice, the middle wheel is just mm away from the LCB - middle-clicking anywhere on the tab to close it has always been a standard browser feature, AFAIAA, so I've grown accustomed to using that (instead of the time-wasting click on the X button, which a) isn't always easy to locate with precision on tabs with shorter width b) is unavailable, e.g. on pinned tabs or via a user setting) ; but to each their own 😺 ...

@DaveH1
Copy link
Author

DaveH1 commented Sep 16, 2024

@DaveH1 wrote:

When I asked Alex, the Thorium developer, about it, he added it to the next version,
so I got the impression that it wasn't that big a deal to do

Hi 😄 ; are you sure you're not confusing this with "Always open bookmarks in a new tab" request of yours? I've searched in vain for your ticket inside all possible Thorium trackers, but I could only find this 😉 ... Further research also showed that this Thorium feature was first implemented in its M110 release (see below), well before any support for XP materialised....

For me, this specific feature is not one I'm after, though 😜 ; having always used 3-button mice, the middle wheel is just mm away from the LCB - middle-clicking anywhere on the tab to close it has always been a standard browser feature, AFAIAA, so I've grown accustomed to using that (instead of the time-wasting click on the X button, which a) isn't always easy to locate with precision on tabs with shorter width b) is unavailable, e.g. on pinned tabs or via a user setting) ; but to each their own 😺 ...

Yes, sorry I'm sure you're right, I was confusing this with the 'always open bookmarks in a new tab' request, which also came from my prolonged use of 360Chrome, where again it's a standard setting option.
That one seems to have proved more elusive to implement in Thorium though!
And yes, I know you can already do it with a middle click on the bookmark too.
I just would like it to just do it all the time!
Again, just as a selectable option which you don't have to activate if you don't want or need it.
Cheers, Dave.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

5 participants