danielptv / bookmark-bar-switcher

Browser extension which enables the user to switch between multiple bookmark bars.
MIT License
7 stars 1 forks source link

Bars getting merged randomly #218

Open Kamiikaze opened 6 months ago

Kamiikaze commented 6 months ago

Description

I run into the issue that sometimes my bars getting merged by changing workspaces and even changing tabs.

Reproduction

I can't reproduce it as it happens randomly.

Environment

OS: Win10 Browser: Opera GX (latest)

Kamiikaze commented 6 months ago

As I don't know how this happens and what triggers the random changes of the bookmark bar, I will fork the newest version and add some additional logging for debugging to see more details what's happening.

danielptv commented 6 months ago

Thank you. I don't have a lot of time right now to investigate by myself. Added you as collaborator so feel free to create a branch for testing in this repository.

Kamiikaze commented 6 months ago

Thank you. I don't have a lot of time right now to investigate by myself. Added you as collaborator so feel free to create a branch for testing in this repository.

Sure, no problem. Thanks! I need to fix it, as this extension is became mandatory for my browser usage^^ Will update you if I found something.

danielptv commented 6 months ago

@Kamiikaze please check out #213. May be related to this issue.

Kamiikaze commented 3 weeks ago

I figured out that Bars getting merged, as I open a new window/popup. So when having a workspace active, which isn't the first one, the new window always open in the first workspace. This results in 2 active Bars and why they are getting merged.

I added a handler to save the first window.id and a check on handleWorkspaceSwitch to only switch Bars if the new active tab's window.id matches the MAIN_WINDOW_ID

Kamiikaze commented 3 weeks ago

After using this now I found an unexpected behaviour with the windowId of the browser.

When dragging out a tab, the MAIN_WINDOW_ID is undefined, as the extensions gets loaded again. This doesn't happen when opening a new window. Need to find a fix for this as the MAIN_WINDOW_ID keeps undefined until I restart the browser.