Mark the current successor tab with [data-successor] attribute #1882
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request is a proposed solution for #1495
It adds
[data-successor]
attribute for a tab which is currently a successor for the current one (will be activated when the current one is closed). With the settingTabs > After closing current tab: previously active tab
it will add this attribute to the previously active tab, esentially replicating the "previous tab highlight" feature from the Arc browser.Here's an example with
Mouse > Tab actions > Activate previously active tab when clicking on the active tab (Tab flip)
enabled:2024-11-24.003712.mp4
Custom CSS rule used:
Another possible solution would be to use
[data-last-active]
attribute instead, and set it on every tab activation in onTabActivated. Probably it's a better solution to achieve the described behavior, but then it is not properly updated on tab close (newly focused tab remains with the last active attribute).I got the impression that marking the successor tab works more reliably for this purpose in all usage scenarios I tested: