When I redirect the newtab to a new url, the focus in the address bar remained where it is, which is quite annoying. If user removes the focus from chrome window and then back again, the giant window with suggestions appeared under the address bar. How can I change url of "newtab" so that the focus moves to the page?
chrome.browserAction.onClicked.addListener(function(tab){
var url={url:"http://example.com"};
if( tab.url.toLowerCase() == "chrome://newtab/" )
chrome.tabs.update(tab.id,url);
else
chrome.tabs.create(url);
});