proginosko / LeechBlockNG-chrome

LeechBlock NG (Next Generation) for Chrome is a simple productivity tool designed to block those time-wasting sites that can suck the life out of your working day. All you need to do is specify which sites to block and when to block them.
https://www.proginosko.com/leechblock/
Mozilla Public License 2.0
72 stars 14 forks source link

Overriding opens a new tab, even when "Show confirmation message when override is activated" is unchecked #29

Closed elldritch closed 2 years ago

elldritch commented 3 years ago

This new tab closes itself right away, but it's still problematic because the opening and closing of a new tab causes the browser to lose focus on the tab I'm on, and instead focus on the closest tab to the confirmation message.

Let's say I have 3 tabs: A, B, and C, open in my window in that order.

I'm currently focused on tab A, and I open a URL that's blocked by LeechBlock. What I want to do now is click the override button in the extension, then click the URL in the blocked tab message, and be on my way. This is the behavior I expect when "Show confirmation message when override is activated" is unchecked.

Instead, clicking the override button quickly opens and then closes a new tab D (this is the confirmation message). Since the window's tab order is then momentarily "A, B, C, D", once the confirmation message tab auto-closes, the browser focuses on tab C instead of tab A. Now I have to manually navigate back to tab A in order to continue browsing.

This is not so much an issue with the 3 tab example, but I often have upwards of 40 tabs open in any one window. With that many tabs, it's a bit annoying to find the tab I used to be on and continue browsing.

I believe this is an issue because unchecking "show confirmation message" causes the confirmation to auto-close but still appear. Instead, the desired behavior is that the confirmation message tab should not appear at all.

proginosko commented 2 years ago

Fixed in version 1.4. Now when a LeechBlock tab is closed, the previously active tab will become active again.

elldritch commented 2 years ago

Amazing! Thank you!