New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 594625 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 592056
Owner: ----
Closed: Mar 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Callback function in "chrome.tabs.create()" does not work for active tab

Reported by osipo...@gmail.com, Mar 14 2016

Issue description

Chrome Version       : <Copy from: '48.0.2564.116'>
URLs (if applicable) : any
What steps will reproduce the problem?
(1) Create simple Chrome extension with "tabs" permissions.
(2) Put the following code to popup.js and execute this:
---
chrome.tabs.create({url: 'http://google.com'}, function(tab) {
alert(tab.id)
	}
)
---

What is the expected result?
I expect to see alert with tab.id value as a result of callback function.


What happens instead?
New tab opens, but callback function doesn't work.
If we will try to execute following code:
---
chrome.tabs.create({url: 'http://google.com', active: false}, function(tab) {
alert(tab.id)
	}
)
---
callback function works correctly.

BTW, "chrome.tabs.create()" creates active tab by default. This problem not reproduced in previous version of Google Chrome (I tested on 46.x).
If this is a new feature, official API documentation https://developer.chrome.com/extensions/tabs#method-create doesn't contain any information about it.

 

Comment 1 by osipo...@gmail.com, Mar 14 2016

Reproduced on Windows 7 and Windows 10 x64.
Cc: ashej...@chromium.org
Mergedinto: 592056
Status: Duplicate (was: Unconfirmed)
The issue looks similar to earlier reported issue '592056', hence merging.

Feel free to un-merge if that is not the case.

Comment 3 by osipo...@gmail.com, Mar 15 2016

It seems as another problem. In my case, the callback function does not work, but in https://bugs.chromium.org/p/chromium/issues/detail?id=592056 callback function returns another value.

Sign in to add a comment