chrome.browserAction.onClicked conflicts with chrome.webNavigation.onCompleted filter?
Reported by
thd...@gmail.com,
Aug 9 2016
|
|||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
Steps to reproduce the problem:
1. Create a dummy extension with "activeTab" and "webNavigation" permissions.
2. Add this to the event page:
// Called when the user navigates
chrome.webNavigation.onCompleted.addListener(function() {
chrome.browserAction.setPopup({
tabId: details.tabId,
popup: 'popup.html'
});
}, {url:[
{
schemes: ['https'],
hostSuffix: 'google.com'
}
]});
// Called when the user clicks on the browser action
chrome.browserAction.onClicked.addListener(function(tab) {
console.log(tab.url);
});
What is the expected behavior?
The event page should output the URL of tab in which you click the browser action.
What went wrong?
Everything works as expected EXCEPT when you click on the browser action that matches the webNavigation filter (https://www.google.com/). It appears that the webNavigation event is somehow overriding the browserAction event.
WebStore page:
Did this work before? N/A
Chrome version: 52.0.2743.116 Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 22.0 r0
,
Aug 9 2016
Never mind, I realized you cannot mix browserAction.onClicked together with browserAction.setPopup.
,
Aug 10 2016
@thdoan: Could you please provide us the sample extension file, which would help us in triaging it further. Thank you.
,
Aug 10 2016
Please close this as I realized you cannot mix browserAction.onClicked together with browserAction.setPopup.
,
Aug 10 2016
Closing this issue as per the comment #5 |
|||
►
Sign in to add a comment |
|||
Comment 1 by thd...@gmail.com
, Aug 9 2016