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

URL is copied from the wrong browser window #90

Closed
slhck opened this Issue Mar 15, 2012 · 7 comments

Comments

Projects
None yet
2 participants
@slhck

slhck commented Mar 15, 2012

When copying an URL (regardless of template used), and another Chrome window is open, the URL of this window is copied instead of the current active tab.

Example:

  • Open window, point it to www.example.com/a
  • Open another window, point it to www.example.com/b
  • Go back to the first window, copy URL
  • Result: URL from b window is copied instead of the currently active a window

At least this happens to me (reproducible) on Chrome Dev, OS X 10.6.

@neocotic

This comment has been minimized.

Show comment
Hide comment
@neocotic

neocotic Mar 16, 2012

Member

I can't reproduce this on Windows XP SP3 Chrome Stable. I'll have to test this tonight on my Mac. However, I can't understand how this is happening as the code fetches the current window ID and then gets the active tab for that window (see background.coffee:372).

How are you triggering the templates (e.g. popup, right-click menu, keyboard shortcut)?

Member

neocotic commented Mar 16, 2012

I can't reproduce this on Windows XP SP3 Chrome Stable. I'll have to test this tonight on my Mac. However, I can't understand how this is happening as the code fetches the current window ID and then gets the active tab for that window (see background.coffee:372).

How are you triggering the templates (e.g. popup, right-click menu, keyboard shortcut)?

@ghost ghost assigned neocotic Mar 16, 2012

@slhck

This comment has been minimized.

Show comment
Hide comment
@slhck

slhck Mar 16, 2012

Strange indeed. I just updated Chrome again, and created a screencast that shows the issue.

As you can see, I open up Google first, then another window with example.com, then go back to the Google Window, copy the URL, and when I paste it, I get example.com.

In fact, if I keep the small Google Chat window open (that pops up from Gmail), I can never copy the current URL, because I always get mail.google.com.

slhck commented Mar 16, 2012

Strange indeed. I just updated Chrome again, and created a screencast that shows the issue.

As you can see, I open up Google first, then another window with example.com, then go back to the Google Window, copy the URL, and when I paste it, I get example.com.

In fact, if I keep the small Google Chat window open (that pops up from Gmail), I can never copy the current URL, because I always get mail.google.com.

@neocotic

This comment has been minimized.

Show comment
Hide comment
@neocotic

neocotic Mar 16, 2012

Member

Unfortunately, my work blocks all videos. I'll have a look at this tonight as I'm very interested in how this is happening and why I can't reproduce it. What is the version number of the current Chrome dev? It could be a bug or change in the API.

Member

neocotic commented Mar 16, 2012

Unfortunately, my work blocks all videos. I'll have a look at this tonight as I'm very interested in how this is happening and why I can't reproduce it. What is the version number of the current Chrome dev? It could be a bug or change in the API.

@slhck

This comment has been minimized.

Show comment
Hide comment
@slhck

slhck Mar 16, 2012

As of now, it's 19.0.1068.1 dev.

slhck commented Mar 16, 2012

As of now, it's 19.0.1068.1 dev.

@neocotic

This comment has been minimized.

Show comment
Hide comment
@neocotic

neocotic Mar 16, 2012

Member

OK, I just installed dev on my work PC and I can now replicate this issue. They've either changed the API or it's a bug. I'll look in to this but at least I know stable is fine.

Member

neocotic commented Mar 16, 2012

OK, I just installed dev on my work PC and I can now replicate this issue. They've either changed the API or it's a bug. I'll look in to this but at least I know stable is fine.

@neocotic

This comment has been minimized.

Show comment
Hide comment
@neocotic

neocotic Mar 16, 2012

Member

It appears that this is related to an API change relating to current windows. However, I'm not sure why chrome.windows.getCurrent isn't returning the correct window ID. However, I may try adding a check for the existence of chrome.windows.WINDOW_ID_CURRENT first and assign that to windowId instead of calling getCurrent. I'm not sure if this will fix anything as it might just do the same as getCurrent.

Member

neocotic commented Mar 16, 2012

It appears that this is related to an API change relating to current windows. However, I'm not sure why chrome.windows.getCurrent isn't returning the correct window ID. However, I may try adding a check for the existence of chrome.windows.WINDOW_ID_CURRENT first and assign that to windowId instead of calling getCurrent. I'm not sure if this will fix anything as it might just do the same as getCurrent.

neocotic added a commit that referenced this issue Mar 16, 2012

@neocotic

This comment has been minimized.

Show comment
Hide comment
@neocotic

neocotic Mar 16, 2012

Member

I wouldn't normally add a fix for the dev build but I can see how it could be annoying and the fix is safe for previous (stable) builds.

I've tested it out and worked fine for me. Let me know if you have any other problems. I reverted back to the stable build immediately. Too much change for me to handle ;) Ugly text and options page made for sad times.

Member

neocotic commented Mar 16, 2012

I wouldn't normally add a fix for the dev build but I can see how it could be annoying and the fix is safe for previous (stable) builds.

I've tested it out and worked fine for me. Let me know if you have any other problems. I reverted back to the stable build immediately. Too much change for me to handle ;) Ugly text and options page made for sad times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment