Webextension command not executed when focus on location bar




WebExtensions: Frontend
7 months ago
7 months ago


(Reporter: sblask, Unassigned)


53 Branch

Firefox Tracking Flags

(Not tracked)


(Whiteboard: triaged)



7 months ago
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0
Build ID: 20170418123315

Steps to reproduce:

Create a webextension with one command that uses Ctrl-Y and implement the listener, see https://github.com/sblask/firefox-open-tabs-next-to-current/commit/9748304517a9ca27d5ce17f439d125736a0b00d4

web-ext run

Once Firefox started, focus location bar and type Ctrl-Y

Actual results:

Nothing, the listener code is never called. If I set the focus somewhere else, the listener code is called

Expected results:

Keyboard shortcuts defined through the commands API should work globally no matter where the focus is.

Comment 1

7 months ago
The problem occurs in Firefox 53 and the 55 Nightly. For me it's worse on the Nightly because I use the shortcut to open a new empty tab where the focus is in the location bar by default(which is great, but it took a while to understand what was going on).


7 months ago
Component: Untriaged → WebExtensions: Frontend
Product: Firefox → Toolkit

Comment 2

7 months ago
commands are on browser, but we intentionally don't execute when location bar focused.  

Is this somethign we want to change going forward?
Priority: -- → P5
Whiteboard: triaged

Comment 3

7 months ago
Any good reason for that? It's very irritating and not obvious.

Commands work fine in Chromium when location bar is focused.

Comment 4

7 months ago
Duping to 1324697, which is about the entire browser and got through design-decision-needed successfully.
Last Resolved: 7 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1325697
Ever confirmed: true
Resolution: DUPLICATE → ---
Duplicate of this bug: 1365176

Comment 6

7 months ago
I kept on having problems with various browser shortcuts for a while, I just realized it's the same problem. Ctrl-Shift-A doesn't work for example when the location bar is focused. And I just realized it's the same for any text input. I thought maybe it's because of a website swallowing keys, but it's the same even here: https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_form_submit Where extension shortcuts might be debatable, browser shortcuts should definitely always work!
You need to log in before you can comment on or make changes to this bug.