Version: 51.0.2704.36 (Official Build) beta (64-bit)
OS: Linux (Ubuntu 14.04)
What steps will reproduce the problem?
(1) Install an extension which can be activated using keyboard shortcuts (the extension in question is internal-only, ping me if you want more details.)
(2) Go to chrome://extensions/ → Keyboard shortcuts and assign e.g. Ctrl-B for “Activate the extension”
(3) Press Ctrl-B on a site on which the extension is not active.
What is the expected output?
Ctrl-B should not be sent to the extension unless the extension is active. When the extension is not active, applications should be able to consume Ctrl-B (frequently used for making text bold).
What do you see instead?
The extension menu for the extension in question is opened.
Please use labels and text to provide additional information.
This used to work correctly before M50 introduced Material Design.
The extension uses the following code for determining whether it should be enabled for a specific tab:
function enableOrDisableForTab(tab) {
var url = new URL(tab.url);
if (url.hostname !== undefined && extEnabledOn(url)) {
chrome.pageAction.show(tab.id);
} else {
chrome.pageAction.hide(tab.id);
}
}
chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
enableOrDisableForTab(tab);
});
chrome.tabs.onActivated.addListener(function(activeInfo) {
chrome.tabs.get(activeInfo.tabId, enableOrDisableForTab);
});
Comment 1 by sheriffbot@chromium.org
, Jun 2 2016