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

Cannot move tabs through Chrome windows that were launched as apps #10

Open
heisencoder opened this issue Oct 13, 2020 · 1 comment
Open

Comments

@heisencoder
Copy link

In my set-up, I have two regular Chrome windows (left and right side) that I want to move tabs between. However, I also launch a couple windows as "Apps", with the tab bar and URL bar hidden. I do this by running commands like this:

/usr/bin/google-chrome --app=https://chat.google.com

However, when I have an app window open, the move-tabs-between-windows command fails to work when it would shift the tab into the app window.

A proposed fix would be to skip over the window if the type property is set to "popup" instead of "normal". Here's a sample:

   case "move-tabs-between-windows":
       ...
          chrome.windows.getCurrent(
            function (currentWindow) {
              let currentWindowIndex = windows.map(window => window.id).indexOf(currentWindow.id)
              let nextWindowIndex = currentWindowIndex;
              let nextWindow = null;
              do {
                nextWindowIndex++;
                if (nextWindowIndex >= windows.length) nextWindowIndex = 0;
                nextWindow = windows[nextWindowIndex];
              } while (nextWindow.type != "normal" && nextWindowIndex != currentWindowIndex);
@heisencoder
Copy link
Author

Pull request available with the fix. I tested this locally and confirmed that it works.

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

No branches or pull requests

1 participant