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

Issue 613158 link

Starred by 3 users

Issue metadata

Status: Archived
Owner: ----
Closed: Jan 10
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Regression: extensions eat activation keyboard shortcuts when not active

Project Member Reported by stapelberg@google.com, May 19 2016

Issue description

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);
});
 
Project Member

Comment 1 by sheriffbot@chromium.org, Jun 2 2016

Labels: Hotlist-Google
Status: Archived (was: Untriaged)
Archiving issues older than 2 years with no owner or component.

Sign in to add a comment