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

Close tab on click, instead of just mousedown #1788

Open
wants to merge 1 commit into
base: v5
Choose a base branch
from

Conversation

FoxRefire
Copy link

@FoxRefire FoxRefire commented Sep 8, 2024

Closes #1437
Closes #1682
Closes #1405
Closes #299

@FoxRefire
Copy link
Author

I am also working on fixing Issue #1786, please define your requirements.
Perhaps this is the part that should be changed.
https://github.com/mbnuqw/sidebery/blob/v5/src/services/tabs.fg.actions.ts#L1184

After I checked the current behavior and the code, I found that each tab panel switches to the last active tab.
In order to maintain the same behavior once the sidebar is closed, it is necessary to maintain tab information in persistent storage, but this incurs overhead.
I can think of three possible options, which or else would be preferable for you?

  • Allow overhead and store per-panel tab information in persistent storage
  • Switch tabs based on lastAccessed attribute as fallback when last active tab per panel is unavailable
  • Switching tabs based on the lastAccessed attribute when explicitly set in the settings

@FoxRefire FoxRefire changed the title Close tab on close, instead of just mousedown Close tab on click, instead of just mousedown Sep 8, 2024
@siddhpant
Copy link
Contributor

siddhpant commented Oct 20, 2024

How does this fix #1405?

It would be a good idea to add a commit message.

@FoxRefire
Copy link
Author

How does this fix #1405?

I don't know why, but after making this change the issue went away.
If this issue still exists after this change, I will make not to close this issue.

@siddhpant
Copy link
Contributor

siddhpant commented Oct 20, 2024

I don't know why, but after making this change the issue went away.

How did you reproduce it?

@FoxRefire
Copy link
Author

FoxRefire commented Oct 20, 2024

How did you reproduce it?

I'm not sure how to reproduce this for sure.
But this often happens when there is little free RAM, such as when watching YouTube with many tabs opened.

@siddhpant
Copy link
Contributor

siddhpant commented Oct 20, 2024

How did you reproduce it?

'm not sure how to reproduce this for sure.
But this often happens when there is little free RAM, such as when watching YouTube with many tabs opened.

Can you mention that in the issue thread as well?

How did you find this? If you think this is the cause, can you run a stresser (say stress-ng) and reproduce? And why would dragging fix it?

If it's a memory issue, why does this change fix it?

@Michael679089
Copy link

Could you show a video demonstration showcasing that it works? @FoxRefire

@emvaized
Copy link
Contributor

I believe a much better solution would be to leave the mousedown event listener, and move "perform action" part to the mouseup listener.

And better yet - start to select tabs on mousedown, sp that user could continue moving the mouse to select more tabs, and apply the configured action on mouseup, similar to how it was done for the middle click multi selection on the tab body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants