Issue metadata
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.
,
Mar 15 2016
The issue looks similar to earlier reported issue '592056', hence merging. Feel free to un-merge if that is not the case.
,
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 |
|||||||||||||||||||||||
Comment 1 by osipo...@gmail.com
, Mar 14 2016